Assigning a group while adding user in django-admin

Posted by Lokharkey on Stack Overflow See other posts from Stack Overflow or by Lokharkey
Published on 2009-12-08T02:43:04Z Indexed on 2010/04/22 0:13 UTC
Read the original article Hit count: 638

Filed under:
|

In my application, I have models that have the Users model as a Foreign key, eg:

class Doctor(models.Model):    
username=models.ForeignKey(User, unique=True)
...

In the admin site, when adding a new Doctor, I have the option of adding a new User next to the username field. This is exactly what I want, but in the dialog that opens, it asks for a username and password for the new user; I would also like to be able to assign a group to this new user. What would be the best way of doing this ?

Thanks, lokharkey

© Stack Overflow or respective owner

Related posts about django

Related posts about django-admin