I intend to create a teaming system, where each team may contain multiple contestants. The contestants is actually auth.User. Something similar to:
Team:
Contestant1
Contestant2
.
.
ContestantN
Since a contestant is actually a user which I cannot modify to have a foreignkey to team. What is the best way to achieve this?
The ways I though was:
- Create a
OneToOneprofile for user which points to a team. - Define a
ManyToManyrelationship between user and team where user has to be unique.
A Pause
I am redesigning the structure of my application, so I will rephrase the question again
Thanks for your replies, I will consider them and see if one of them fits.
You can do this:
This allows one user to take part in different teams, but if you don’t want to allow this, you can add unique=True to Contestant.user.