Last active
April 2, 2021 20:32
-
-
Save michaelhelmick/820707d57e7cc6b6e5ae861c37d5f8b6 to your computer and use it in GitHub Desktop.
game/models.py with TeeBall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.utils.translation import gettext_lazy as _ | |
class Game(models.Model): | |
TEEBALL_INTRODUCED_VERSION = "1.1.0" | |
class GameType(models.TextChoices): | |
BASEBALL = "BB", _("Baseball") | |
SOFTBALL = "SB", _("Softball") | |
TEEBALL = "TB", _("Tee-ball") | |
type = models.CharField( | |
max_length=2, | |
choices=GameType.choices, | |
default=GameType.BASEBALL, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment