-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
projects/migrations: use topics enum instead of tuples
- Loading branch information
Showing
6 changed files
with
34 additions
and
19 deletions.
There are no files selected for viewing
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
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
4 changes: 2 additions & 2 deletions
4
adhocracy4/projects/migrations/0043_migrate_topics_to_m2m_topics.py
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# fmt: off | ||
|
||
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
|
||
class TopicEnum(models.TextChoices): | ||
"""Choices for project topics.""" | ||
|
||
ANT = "ANT", _("Anti-discrimination"), | ||
WOR = "WOR", _("Work & economy"), | ||
BUI = "BUI", _("Building & living"), | ||
EDU = "EDU", _("Education & research"), | ||
CHI = "CHI", _("Children, youth & family"), | ||
FIN = "FIN", _("Finances"), | ||
HEA = "HEA", _("Health & sports"), | ||
INT = "INT", _("Integration"), | ||
CUL = "CUL", _("Culture & leisure"), | ||
NEI = "NEI", _("Neighborhood & participation"), | ||
URB = "URB", _("Urban development"), | ||
ENV = "ENV", _("Environment & public green space"), | ||
TRA = "TRA", _("Traffic") |
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