diff --git a/elections2021/constants.py b/elections2021/constants.py index 3350e1f6bce5b4ebcb2efbacb697eb41fd6dfd37..c39b48e1d94d19d4a555c6316b680c7707c7d550 100644 --- a/elections2021/constants.py +++ b/elections2021/constants.py @@ -125,21 +125,6 @@ REGION_NAME_VARIANT = {code: name2 for code, slug, name, name2 in REGION_DATA} REGION_SLUGS = {slug: code for code, slug, name, name2 in REGION_DATA} REGION_OPTIONS = [(slug, name) for code, slug, name, name2 in REGION_DATA] -MONTH_NAMES = [ - "Leden", - "Únor", - "Březen", - "Duben", - "Květen", - "Červen", - "Červenec", - "Srpen", - "Září", - "Říjen", - "Listopad", - "Prosinec", -] - PIRATES = "pirati" STAN = "stan" PARTY_CHOICES = ((PIRATES, "Piráti"), (STAN, "STAN")) diff --git a/main/constants.py b/main/constants.py new file mode 100644 index 0000000000000000000000000000000000000000..9d96beb5c5b4da8d2369258e38b060777160ecfa --- /dev/null +++ b/main/constants.py @@ -0,0 +1,14 @@ +MONTH_NAMES = [ + "Leden", + "Únor", + "Březen", + "Duben", + "Květen", + "Červen", + "Červenec", + "Srpen", + "Září", + "Říjen", + "Listopad", + "Prosinec", +] diff --git a/main/models.py b/main/models.py index 91d81a5a2558d46dc15dc6e4e589e304cfa64180..3edde815d9348ac3a14a19bc1f72e67fa59ea748 100644 --- a/main/models.py +++ b/main/models.py @@ -24,10 +24,7 @@ from wagtail.core.fields import RichTextField, StreamField from wagtail.core.models import Page from wagtailmetadata.models import MetadataPageMixin -from elections2021.constants import ( # pozor, import ze sousedního modulu - MONTH_NAMES, - REGION_CHOICES, -) +from elections2021.constants import REGION_CHOICES # pozor, import ze sousedního modulu from shared.const import RICH_TEXT_DEFAULT_FEATURES from shared.forms import SubscribeForm from shared.models import ( # MenuMixin, @@ -41,6 +38,7 @@ from tuning import admin_help from twitter_utils.models import Tweet from . import blocks +from .constants import MONTH_NAMES from .forms import JekyllImportForm from .menu import MenuMixin