0

I have a webapp and all of my users are divided into 2 groups: Teachers and Students. How can I create groups and assign users to groups in order to identify which group a user belongs to in Django? Additionally, can I create views that only certain groups can access?

Serket
  • 3,785
  • 3
  • 14
  • 45

1 Answers1

0

Here are some resources below for you to take a look at:

You can create a two groups, Teacher and Student. You will then assign permissions to these groups, not the individual users. Therefore, if you part of the teacher group, you get all teacher permissions.

Django groups docs

Medium article for groups

Creating groups - StackOverflow

Dean Elliott
  • 1,245
  • 1
  • 8
  • 12