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]
DEBUG = true DEBUG = true
......
...@@ -12,6 +12,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...@@ -12,6 +12,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
config = configparser.RawConfigParser() config = configparser.RawConfigParser()
config.read('/etc/warpinfra/config.ini') config.read('/etc/warpinfra/config.ini')
# COMMON
APPS = [app.strip() for app in config.get('common','APPS').split(",")]
# LDAP # LDAP
LDAP_HOST = "ldap://"+config.get('ldap','LDAP_HOST') LDAP_HOST = "ldap://"+config.get('ldap','LDAP_HOST')
...@@ -57,7 +59,7 @@ LOGIN_REDIRECT_URL = '/' ...@@ -57,7 +59,7 @@ LOGIN_REDIRECT_URL = '/'
MEDIA_ROOT = 'templates/media/' MEDIA_ROOT = 'templates/media/'
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
INSTALLED_APPS = ( INSTALLED_APPS = [
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
...@@ -72,14 +74,9 @@ INSTALLED_APPS = ( ...@@ -72,14 +74,9 @@ INSTALLED_APPS = (
'django_otp', 'django_otp',
'django_otp.plugins.otp_static', 'django_otp.plugins.otp_static',
'django_otp.plugins.otp_totp', 'django_otp.plugins.otp_totp',
'two_factor', 'two_factor'
'warpapi', ]
'warpmain', INSTALLED_APPS.extend(APPS)
'warpauth',
'warpfood',
# 'warppay'
)
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware', '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