- 2010-02-12 05:23:49
- Adding additional user information
- Board » Django Standard Library » Authentication
I'm kinda new to Django, and just finished reading the Django book. Now I was wondering the following when it comes to user management.
In the Django documentation I found that storing additional information is acomplished by writing a new model and add a foreign key to the user.
Then in the settings file add a reference to the model by adding: AUTH_PROFILE_MODULE = 'app.UserProfileModel'
So far, so good. But now I want to have two (or more) user types on my site with each their additional info. lets say I have a user representing a Teacher wich I want to store the additional info 'age, gender, experience_years' AND a user representing a student which I want to give the additional info 'student number, class'.
What is the best practice to accomplish this. Is it somehow possible to add additional information to a group of users?
Thanks very much.