enum types fkr
This commit is contained in:
parent
32032f4f9e
commit
545d05ece8
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user