Is it correct way to create 2 profiles in django? I want student to have access to his teachers, and teacher to his students as well. I mean if I log in as a student, I want to browse exactly teachers who teach me, and if I log in as a teacher, I want to browse exactly students which I teach. That is way I rather can not create one profile for both teachers and students.
class Teacher(models.Model):
...
user = models.OneToOneField(User)
class Student(models.Model):
...
user = models.OneToOneField(User)
teacher = models.ManyToManyField(Teacher)
if so, my AUTH_PROFILE_MODULE should look that way?
AUTH_PROFILE_MODULE = 'school.Teacher, school.Student'
would be grateful for any answers.
Thanks!
You can make use of a single profile;
Then you can access the necessary information with;