Admin - change ForeignKey display text

25 views
Skip to first unread message

galgal

unread,
Jul 27, 2011, 4:59:02 PM7/27/11
to django...@googlegroups.com

How can I change the display text in select while selecting a field which is as ForeignKey? I need to display not only the name of FK, but also name of it's parent.

Anybody can give a clue?

Uros Trebec

unread,
Jul 28, 2011, 4:38:19 AM7/28/11
to Django users
You should take a look at the Django documentation once more,
somewhere around this area:
https://docs.djangoproject.com/en/1.3/ref/models/instances/#django.db.models.Model.__unicode__

--
Uros
Reply all
Reply to author
Forward
0 new messages