Re: Different __unicode__ return values for admin site?

2008-09-01 Thread Nick Day
Thanks for your help - I used list_display and it works fine. Cheers, Nick On Sep 1, 2:55 pm, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > Hello, > > I guess that you want to have more details in admin list view. > You can use list_display configuration attribute in admin class for your >

Re: Different __unicode__ return values for admin site?

2008-09-01 Thread Valts Mazurs
Hello, I guess that you want to have more details in admin list view. You can use list_display configuration attribute in admin class for your model. << models.py >> class MyModel(models.Model): short_name = models.CharField(max_length = 20) full_name = models.CharField(max_length = 100)

Different __unicode__ return values for admin site?

2008-09-01 Thread Nick Day
Hi, I have a model with a __unicode__ method as follows: def __unicode__(self): return self.short_name However, if this is being called from within the admin site, I would like it to return something different e.g: def __unicode__(self): return self.full_name This is so I can allow