From 90851fc698bbb599d1d482069b6a8aec7ee9eabe Mon Sep 17 00:00:00 2001
From: Quido Zientek <quido@codero.cz>
Date: Wed, 31 Aug 2022 08:49:14 +0200
Subject: [PATCH] [FIX] separate constants in main

---
 elections2021/constants.py | 15 ---------------
 main/constants.py          | 14 ++++++++++++++
 main/models.py             |  6 ++----
 3 files changed, 16 insertions(+), 19 deletions(-)
 create mode 100644 main/constants.py

diff --git a/elections2021/constants.py b/elections2021/constants.py
index 3350e1f6..c39b48e1 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 00000000..9d96beb5
--- /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 91d81a5a..3edde815 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
 
-- 
GitLab