[extensions-web/backports: 4/6] settings: allow to add installed apps and middlewares using local settings
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/backports: 4/6] settings: allow to add installed apps and middlewares using local settings
- Date: Sun, 16 Jan 2022 10:27:18 +0000 (UTC)
commit 58047b0acd910b19e4d6ca3b46f944fd35cf6d2b
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Sun Nov 22 12:41:09 2020 +0400
settings: allow to add installed apps and middlewares using local settings
sweettooth/settings.py | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/sweettooth/settings.py b/sweettooth/settings.py
index 6e3644c..2399425 100644
--- a/sweettooth/settings.py
+++ b/sweettooth/settings.py
@@ -182,11 +182,18 @@ if os.getenv('EGO_EMAIL_URL'):
NO_SECURE_SETTINGS = True if os.getenv('EGO_NO_SECURE_SETTINGS') else False
NO_STATICFILES_SETTINGS = False
+APPEND_INSTALLED_APPS = PREPEND_MIDDLEWARE = ()
+
try:
from local_settings import *
except ImportError:
pass
+if APPEND_INSTALLED_APPS:
+ INSTALLED_APPS += APPEND_INSTALLED_APPS
+
+if PREPEND_MIDDLEWARE:
+ MIDDLEWARE = PREPEND_MIDDLEWARE + MIDDLEWARE
# Enable secure settings in case DEBUG is disabled and NO_SECURE_SETTINGS is not set to True
if not DEBUG and not NO_SECURE_SETTINGS:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]