I’d like to extend/subclass admin Groups & Users classes in Django.
- CourseAdmin group should be doing what admin can do, and they have extra information like email, phone, address.
- CourseAdmin should be able to create CourseAdmins, Teachers, Courses and Students.
- Teacher should be able to edit courses and students belong to them. They can’t create anything new.
I want to make use of current Django admin classes Group & User instead of doing my own. Please kindly advise. Thank you!
Do you mean that the whole group
CourseAdminhas one email, phone and address? I doubt that.Otherwise you don’t have to subclass anything. Just create a user profile model (that includes e.g. email, phone, address), create the groups:
CourseAdmin,Teacher,Studentsand set up the permissions accordingly.You can distinguish the users by checking in which group they are in.
More about user authentication.