Note: I've also posted this question StackOverflow 
<http://stackoverflow.com/questions/28919379/how-do-i-set-up-this-formset-in-django>
 but 
sadly, it hasn't been answered yet.

My setup consists of a League which can contains multiple Teams.  I'm 
trying to build a form for setting up a (single or double) elimination 
style tournament.  

Example:
League1 consists of teams A, B, C, and D

I'd like to create a form that has one "general" field for choosing the 
tournament style (Single Elimination or Double Elimination) and a field for 
each team in the league to determine their initial seeding in the 
tournament.  Something like

Style: choice field - {single or double elimination}Seed1: choice field - 
{TeamA or TeamB or TeamC or TeamD}Seed2: choice field - {TeamA or TeamB or 
TeamC or TeamD}Seed3: choice field - {TeamA or TeamB or TeamC or TeamD}Seed4: 
choice field - {TeamA or TeamB or TeamC or TeamD}

I assume I'll need to make use of formsets, but I can't figure out how to rig 
everything up correctly.  Can anyone lend me a hand?

My models.py looks like 

class League(models.Model):
    league_name = models.CharField(max_length=60)
class Team(models.Model):
    league = models.ForeignKey('League')
    team_name = models.CharField(max_length=60)

Many thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a5e3c67d-3d4a-461b-95f7-eef7f2243137%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to