Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3879368
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:43:06+00:00 2026-05-19T22:43:06+00:00

I intend to create a teaming system, where each team may contain multiple contestants.

  • 0

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 OneToOne profile for user which points to a team.
  • Define a ManyToMany relationship 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T22:43:06+00:00Added an answer on May 19, 2026 at 10:43 pm

    You can do this:

    class Team(models.Model):
        contestants = models.ManyToManyField(User, through='Contestant')
    
    class Contestant(models.Model):
        team = models.ForeignKey(Team)
        user = models.ForeignKey(User)
        [here go Contestant data fields]
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In application based on HornetQ engine I intend to create multiple Producers and Consumers.
I intend to develop a system that is entirely based on modules. The system
I intend to create asp.net pages using Visual Studio 2008. Preferably, the pages should
I have a data that looks like this . And I intend to create
I've got Windows Vista and Windows 7 here. I intend to create an iPhone
I intend to use Javascript to dynamically create a group of html elements (input
How do I create a 'user defined function' that returns a 'cursor' back to
I intend to create a checker function which will be used by another functions.
Why can't C++ determine that I intend to create a unique_ptr<A> with this syntax?
I would like to generate some images dynamicaly. For that, I intend to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.