Re: Django Admin - list_display doesn't follow FK links?

2011-01-29 Thread Mathieu Möller
Hey Victor, - I changed my subscription to my gmail-account because I'm not sure if my email went trough. Here is it again. - I do the following to get data out of a related table/model: Of course you could access your other model via __unicode__... Or,

Re: Django Admin - list_display doesn't follow FK links?

2011-01-29 Thread Excite User
Hey Victor, I do the following to get data out of a related table/model: Of course you could access your other model via __unicode__... Or, simply write a function for your model and use a callback in your list_display: Here an easy "quick and dirty" example: class othermodel(models.Model) impo

Re: Django Admin - list_display doesn't follow FK links?

2011-01-29 Thread Daniel Roseman
On Saturday, January 29, 2011 12:28:49 PM UTC, Victor Hooi wrote: > > Hi, > > I'm trying to use list_display in the django-admin, and I can't seem to > find a way to get list_display to follow FK links. > > My models.py: > > class Site(models.Model): > name = models.CharField(max_length=50, un

Django Admin - list_display doesn't follow FK links?

2011-01-29 Thread Victor Hooi
Hi, I'm trying to use list_display in the django-admin, and I can't seem to find a way to get list_display to follow FK links. My models.py: class Site(models.Model): name = models.CharField(max_length=50, unique=True) description = models.TextField() def __unicode__(self):