Add missing file
This commit is contained in:
parent
3ac59ef3a2
commit
7dd6412e59
26
src/agenda_culturel/models/constants.py
Normal file
26
src/agenda_culturel/models/constants.py
Normal file
@ -0,0 +1,26 @@
|
||||
from django.utils.translation import gettext as _
|
||||
from enum import IntEnum
|
||||
|
||||
|
||||
TITLE_ISSUE_WARNING = _("Warning")
|
||||
TITLE_ISSUE_PREFIX = " - " + TITLE_ISSUE_WARNING + ": "
|
||||
|
||||
TITLE_ISSUE_DATE_IMPORTATION = TITLE_ISSUE_PREFIX + _(
|
||||
"the date has not been imported correctly."
|
||||
)
|
||||
|
||||
|
||||
TITLE_ISSUE_TIME_IMPORTATION = TITLE_ISSUE_PREFIX + _(
|
||||
"the time has not been imported correctly."
|
||||
)
|
||||
|
||||
|
||||
class PUBLICATION_ISSUE(IntEnum):
|
||||
DATE_IMPORTATION_IN_TITLE = 1
|
||||
TIME_IMPORTATION_IN_TITLE = 2
|
||||
|
||||
def __str__(self):
|
||||
return {
|
||||
PUBLICATION_ISSUE.DATE_IMPORTATION_IN_TITLE: _("date import problem"),
|
||||
PUBLICATION_ISSUE.TIME_IMPORTATION_IN_TITLE: _("time import problem"),
|
||||
}[self.value]
|
Loading…
x
Reference in New Issue
Block a user