aboutsummaryrefslogtreecommitdiff
path: root/weblog/__init__.py
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-05-31 15:04:45 +0300
committerYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-05-31 15:04:45 +0300
commit5a7466204b4030873405b1a0fcb8b208762453ee (patch)
treebc73cccb953b6ba25afdb7dffbee505a296e94ac /weblog/__init__.py
parentbe41310b3dc4aec12d3a950cf9fe737811436499 (diff)
downloadw3blog-5a7466204b4030873405b1a0fcb8b208762453ee.tar.gz
w3blog-5a7466204b4030873405b1a0fcb8b208762453ee.zip
Ability to pin posts, updated to bootstrap 4, fixes
Diffstat (limited to 'weblog/__init__.py')
-rwxr-xr-x[-rw-r--r--]weblog/__init__.py79
1 files changed, 3 insertions, 76 deletions
diff --git a/weblog/__init__.py b/weblog/__init__.py
index a97f18a..8c180c5 100644..100755
--- a/weblog/__init__.py
+++ b/weblog/__init__.py
@@ -1,79 +1,6 @@
from . import apps
from django.conf import settings
-try:
- apps.SETTINGS['enable_comments'] = settings.WEBLOG_ENABLE_COMMENTS
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['allow_anon_comments'] = settings.WEBLOG_ALLOW_ANON_COMMENTS
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['multilingual'] = settings.WEBLOG_MULTILINGUAL
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['blog_title'] = settings.WEBLOG_TITLE
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['base_template'] = settings.WEBLOG_BASE_TEMPLATE
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['show_author'] = settings.WEBLOG_SHOW_AUTHOR
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['use_authors_username'] = settings.WEBLOG_USE_AUTHORS_USERNAME
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['show_sidebar'] = settings.WEBLOG_SHOW_SIDEBAR
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['show_categories'] = settings.WEBLOG_SHOW_CATEGORIES
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['show_archive'] = settings.WEBLOG_SHOW_ARCHIVE
-except AttributeError:
- pass
-except NameError:
- pass
-
-try:
- apps.SETTINGS['posts_per_page'] = settings.WEBLOG_POSTS_PER_PAGE
-except AttributeError:
- pass
-except NameError:
- pass \ No newline at end of file
+if settings.WEBLOG_SETTINGS:
+ for key, value in settings.WEBLOG_SETTINGS.items():
+ apps.SETTINGS[key] = value