> On Tue, Mar 22, 2011 at 5:29 PM, Jason Culverhouse
> wrote:
> On Mar 22, 2011, at 12:10 PM, Bobby Roberts wrote:
>
> > how else would you pull in information from another model into the
> > current model list view in admin?
> >
> >
> There are some options:
> Search for
> http://www.google.c
On Tue, Mar 22, 2011 at 5:29 PM, Jason Culverhouse wrote:
> On Mar 22, 2011, at 12:10 PM, Bobby Roberts wrote:
>
> > how else would you pull in information from another model into the
> > current model list view in admin?
> >
> >
> There are some options:
> Search for
> http://www.google.com/searc
On Mar 22, 2011, at 12:10 PM, Bobby Roberts wrote:
> how else would you pull in information from another model into the
> current model list view in admin?
>
>
There are some options:
Search for
http://www.google.com/search?q=ModelAdmin+__
You'll find http://code.djangoproject.com/ticket/10743
yeah we want it split into first name and last name. That part is
working fine... i'm just trying to figure out how to get the column
sortable by clicking on the column header.
On Mar 22, 3:53 pm, Siara wrote:
> Hmm i dont know but if you dont realy need 2 separate colums for name
> and surname
Hmm i dont know but if you dont realy need 2 separate colums for name
and surname you can define in Customer __unicode__ like that:
def __unicode__(self):
return self.lastName + " " + self.firstName
and then in list_diplay = ['CustomerId'],
but that solution could give ou another problems
On
how else would you pull in information from another model into the
current model list view in admin?
On Mar 22, 2:41 pm, Siara wrote:
> Why are you doing this way ?
> The better idea is to make it that way:
>
> class YourModelAdmin(admin.ModelAdmin):
> model = YourModel
> list_display = [
Why are you doing this way ?
The better idea is to make it that way:
class YourModelAdmin(admin.ModelAdmin):
model = YourModel
list_display = [ 'firstName', 'lastName' ]
admin.site.register(YourModel, YourModelAdmin)
and i'm sure then you will be able to sort olums
On 22 Mar, 19:28, Bobby
7 matches
Mail list logo