B
B
bolotbekov2016-04-10 19:57:58
Django
bolotbekov, 2016-04-10 19:57:58

How to save different data for different user groups?

It is necessary to develop a "system of testing students."
There are user groups "Admin", "Teacher", "Student".
Different user groups have different data.
Teacher - full name, login / password, position, etc.
Student - full name, login / password, group, faculty, course, etc.
How to organize the model so that both teachers and students can log in? and how to close access to the admin panel to the Students group?
Thank you all in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daniil Kolesnichenko, 2016-04-16
@KolesnichenkoDS

As an option, create models Studentand Teacher, and in each of them link one-to-one with the model Userfrom django.contrib.auth.models.
Admin rights can be controlled via user_permissionsmodel field User( details )

B
bolotbekov, 2016-04-16
@bolotbekov

OK thanks!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question