how to change display text in django admin foreignkey dropdown
Posted
by FurtiveFelon
on Stack Overflow
See other posts from Stack Overflow
or by FurtiveFelon
Published on 2010-06-18T16:27:07Z
Indexed on
2010/06/18
16:33 UTC
Read the original article
Hit count: 296
django
|django-admin
Hi all,
I have a task list, with ability to assign users. So i have foreignkey to User model in the database. However, the default display is username in the dropdown menu, i would like to display full name (first last) instead of the username. If the foreignkey is pointing to one of my own classes, i can just change the str function in the model, but User is a django authentication model, so i can't easily change it directly right?
Anyone have any idea how to accomplish this?
Thanks a lot!
© Stack Overflow or respective owner