V
V
Vitaly2016-08-10 09:39:48
Django
Vitaly, 2016-08-10 09:39:48

How to join a Django group by invite?

I'm doing it on a user community site. At the same time, I inherit from standard groups, with the addition of the group creator field. How can I make it possible to join the group only by invitation of the administrator?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2016-08-10
@MrCute

I would have an Invite model with a text field to store the unique identifier of the invite, a ForeignKey for the group and, if necessary, a ForeignKey for the User to whom the invite is intended. I would also make a view to enter the invite ID. If the identifier is entered correctly, the user is added to the group, and the invite is either deleted or marked as used.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question