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,
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
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
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):
4 matches
Mail list logo