Many-to-Many with three classes

In models.py I have three classes (student, group, period) and there is many-to-many link between them That’s mean : one student can be in different groups at different periods and in a group we can have many students etc.
I can add a class “registered” to store the date of registrate student in a group at the period chosen.
How can write this in models.py please.

It sounds like you need a custom through model.

Thank you for your reply, Ok, but if I add to the example given in you link one class named “activity” witch content differents activities witch the person can pratice with an group.
So one person can pratice an activity in a group and an other activity with an other group. How can become views.py ?
Excuse me for the language, I don’t write very well English. Thanks.