Answer the question
In order to leave comments, you need to log in
How to create groups in Django site?
I welcome everyone. I'm learning Django Framework and I'm facing the following problem. I want to create groups for users (the essence is about the same as VK groups). So that anyone can create their own group, invite other users, make discussions inside, for example, see a list of all groups, and so on. But since I'm still a beginner, I don't know which way to look, which models to create, which classes to use ..
Answer the question
In order to leave comments, you need to log in
System, what:
Django has built-in groups. Each group has its own rights (which can be created, assigned, deleted). Group membership is assigned to the user model, rights are also assigned to the user.
As a result:
1) You use the API to create a group
2) You create rights (perminission) within this group.
3) Then you assign group membership and their rights to users.
Let's say with the help of this thing I separated paid and free users, and determined tariffs for paid ones.
those. When paying, the user is added to the group of paid users, and, depending on the tariff, receives certain rights within this group. Well, already through the view / template to determine what and how to display for the user
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question