From e5cb06cb5c96e680319aa1a3eae2a1946ccb4a06 Mon Sep 17 00:00:00 2001
From: Dennis Ahrens <dennis.ahrens@hs-hannover.de>
Date: Wed, 8 Nov 2017 15:15:37 +0100
Subject: [PATCH] Close #7 - settings only once.

---
 hshassets/app_settings/defaults.py | 12 ++++++++++++
 hshassets/settings.py              | 15 ---------------
 hshassets/utils.py                 |  2 +-
 3 files changed, 13 insertions(+), 16 deletions(-)
 delete mode 100644 hshassets/settings.py

diff --git a/hshassets/app_settings/defaults.py b/hshassets/app_settings/defaults.py
index 16da52c5..b45d1079 100644
--- a/hshassets/app_settings/defaults.py
+++ b/hshassets/app_settings/defaults.py
@@ -2,3 +2,15 @@
 # piwi stuff
 PIWIK_URL = 'piwik.it.hs-hannover.de'
 PIWIK_SITE_ID = None
+
+# setting the color scheme for the default compiled style and base html
+# available are:
+#
+#   'service' - default, central service yellow                               - rgb(255, 210, 0)
+#   'zsw'     - mint for ZSW                                                  - rgb(70,  180, 140)
+#   'f1'      - light blue for faculty 1, "Elektro- und Informationstechnik"  - rgb(30,  190, 235)
+#   'f2'      - green for faculty 2, "Maschinenbau und Bioverfahrenstechnik"  - rgb(150, 190, 0)
+#   'f3'      - light blue for faculty 3, "Medien, Information und Design"    - rgb(255, 165, 0)
+#   'f4'      - light blue for faculty 4, "Wirtschaft und Informatik"         - rgb(220, 50,  5)
+#   'f5'      - light blue for faculty 5, "Diakonie, Gesundheit und Soziales" - rgb(210, 60,  150)
+COLOR_SCHEME = 'service'
diff --git a/hshassets/settings.py b/hshassets/settings.py
deleted file mode 100644
index 701f2a86..00000000
--- a/hshassets/settings.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from django.conf import settings
-
-
-# setting the color scheme for the default compiled style and base html
-# available are:
-#
-#   'service' - default, central service yellow                               - rgb(255, 210, 0)
-#   'zsw'     - mint for ZSW                                                  - rgb(70,  180, 140)
-#   'f1'      - light blue for faculty 1, "Elektro- und Informationstechnik"  - rgb(30,  190, 235)
-#   'f2'      - green for faculty 2, "Maschinenbau und Bioverfahrenstechnik"  - rgb(150, 190, 0)
-#   'f3'      - light blue for faculty 3, "Medien, Information und Design"    - rgb(255, 165, 0)
-#   'f4'      - light blue for faculty 4, "Wirtschaft und Informatik"         - rgb(220, 50,  5)
-#   'f5'      - light blue for faculty 5, "Diakonie, Gesundheit und Soziales" - rgb(210, 60,  150)
-
-COLOR_SCHEME = getattr(settings, 'HSHASSETS_COLOR_SCHEME', 'service')
diff --git a/hshassets/utils.py b/hshassets/utils.py
index 50f4b04e..5941c144 100644
--- a/hshassets/utils.py
+++ b/hshassets/utils.py
@@ -1,6 +1,6 @@
 from django.conf import settings
 
-from hshassets.settings import COLOR_SCHEME
+from hshassets.app_settings import COLOR_SCHEME
 
 from importlib import import_module
 
-- 
GitLab