How to implement 3 user types for Django
If l have 3 user types, let's say a normal user, a student and a teacher. How can l allow each to register in the user table, so that each can login to the system?
You can add an account_type field to the User model with the choices normal, student and teacher, then let them select an account type when registering
They shouldn't be able to select the account type. Reason is: a random person can just come to register as a teacher.
The best way to go about this is to have a separate registration form for the teacher. The teacher account would be created by the admin while the admin would be created by the super admin.
After the creation of the teacher account, then the details is given to the teacher so as to login.
And don't forget to give each of them a privilege_id so as to specify their permission