1 | class LeagueSeason(models.Model):
|
---|
2 | is_conference_used = models.BooleanField(default=False)
|
---|
3 | is_division_used = models.BooleanField(default=False)
|
---|
4 |
|
---|
5 | class LeagueConference(models.Model):
|
---|
6 | league_season = models.ForeignKey(LeagueSeason)
|
---|
7 | name = models.CharField(max_length=50)
|
---|
8 | # slug is not unique by itself.
|
---|
9 | slug = models.CharField(max_length=50,prepopulate_from=('name',), db_index=True)
|
---|
10 | sort_order = models.SmallIntegerField(default=1)
|
---|
11 |
|
---|
12 | class LeagueDivision(models.Model):
|
---|
13 | league_conference = models.ForeignKey(LeagueConference)
|
---|
14 | name = models.CharField(max_length=50)
|
---|
15 | # slug is not unique by itself.
|
---|
16 | slug = models.CharField(max_length=50,prepopulate_from=('name',), db_index=True)
|
---|
17 | sort_order = models.SmallIntegerField(default=1)
|
---|
18 |
|
---|