diff --git a/apps/home/models.py b/apps/home/models.py index d4b4e76..03709b6 100644 --- a/apps/home/models.py +++ b/apps/home/models.py @@ -41,13 +41,18 @@ class AnglerGroup(models.Model): name = models.CharField(max_length=128) anglers = models.ManyToManyField(to=Angler) - TYPES = ( - (0, "Set"), # Collection of commonly used anglers to aide in their selection for a match or league. - (1, "Team"), # Collection of anglers that acts as a single competing unit in a match or league. - (2, "Pair") # Two anglers that acts as a single competing unit in a match or league. - ) + class Types: + SET = 0 # Collection of commonly used anglers to aide in their selection for a match or league. + TEAM = 1 # Collection of anglers that acts as a single competing unit in a match or league. + PAIR = 2 # Two anglers that acts as a single competing unit in a match or league. - type = models.PositiveSmallIntegerField(choices=TYPES) + type = models.PositiveSmallIntegerField( + choices=( + (Types.SET, "Set"), + (Types.TEAM, "Team"), + (Types.PAIR, "Pair") + ) + ) class Meta: verbose_name = "angler group"