views:

26

answers:

1

My Book model has an author attribute which today is simply a CharField. The value for author should be one of the registered users of my Django site. When creating a new Book object in Django admin, I would like author to be displayed as a combo box showing all registered users. How would I go about achieving this?

+3  A: 

You can make your author attribute a foreign key to django.contrib.auth.models.User and use limit_choices_to.

muksie
if you're linking to auth.models.User you don't really need to limit the choices - if they're registered users, they're in contrib.auth's User table
stevejalim