Created
April 2, 2021 13:38
-
-
Save michaelhelmick/a6a471c1e93597a3ae061df6277a6651 to your computer and use it in GitHub Desktop.
game/models.py
This file contains hidden or 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): | |
class GameType(models.TextChoices): | |
BASEBALL = "BB", _("Baseball") | |
SOFTBALL = "SB", _("Softball") | |
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