v. 0.2.
[django-ssify.git] / ssify / conf.py
diff --git a/ssify/conf.py b/ssify/conf.py
new file mode 100644 (file)
index 0000000..c06eaa8
--- /dev/null
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+# This file is part of django-ssify, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See README.md for more information.
+#
+from django.conf import settings
+
+
+class AppSettings(object):
+    prefix = 'SSIFY_'
+
+    @classmethod
+    def add(cls, name, default):
+        setattr(cls, name, property(lambda self:
+            getattr(settings, self.prefix + name, default)))
+
+
+AppSettings.add('CACHE_ALIASES', None)
+AppSettings.add('RENDER', False)
+AppSettings.add('RENDER_VERBOSE', False)
+
+
+conf = AppSettings()