Skip to content
Snippets Groups Projects
Commit ee6e5785 authored by Christian Dresen's avatar Christian Dresen
Browse files

[WarpInfra] Parameterize running apps inside config file. Closed #31

parent 11997aa5
No related branches found
No related tags found
No related merge requests found
[common]
# Possible Apps: warpmain, warpauth, warpfood, warpapi, warppay
APPS = warpmain, warpauth, warpfood, warppay, warpapi
[debug]
DEBUG = true
......
......@@ -12,6 +12,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
config = configparser.RawConfigParser()
config.read('/etc/warpinfra/config.ini')
# COMMON
APPS = [app.strip() for app in config.get('common','APPS').split(",")]
# LDAP
LDAP_HOST = "ldap://"+config.get('ldap','LDAP_HOST')
......@@ -57,7 +59,7 @@ LOGIN_REDIRECT_URL = '/'
MEDIA_ROOT = 'templates/media/'
MEDIA_URL = '/media/'
INSTALLED_APPS = (
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
......@@ -72,14 +74,9 @@ INSTALLED_APPS = (
'django_otp',
'django_otp.plugins.otp_static',
'django_otp.plugins.otp_totp',
'two_factor',
'warpapi',
'warpmain',
'warpauth',
'warpfood',
# 'warppay'
)
'two_factor'
]
INSTALLED_APPS.extend(APPS)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment