Gitlab CSE Unil

Commit bb33a18a authored by Julien Furrer's avatar Julien Furrer
Browse files

Fixed staging settings

parent 1804a884
...@@ -112,8 +112,8 @@ WSGI_APPLICATION = '%s.wsgi.application' % SITE_NAME ...@@ -112,8 +112,8 @@ WSGI_APPLICATION = '%s.wsgi.application' % SITE_NAME
# ========== URL CONFIGURATION # ========== URL CONFIGURATION
# #
def update_urls(base_url=None): def update_urls(base_url=None, name=__name__):
this_module = modules[__name__] this_module = modules[name]
if base_url is None: if base_url is None:
base_url = getattr(this_module, 'BASE_URL', "/") base_url = getattr(this_module, 'BASE_URL', "/")
setattr(this_module, 'SESSION_COOKIE_PATH', base_url) setattr(this_module, 'SESSION_COOKIE_PATH', base_url)
...@@ -121,7 +121,7 @@ def update_urls(base_url=None): ...@@ -121,7 +121,7 @@ def update_urls(base_url=None):
setattr(this_module, 'MEDIA_URL', '{}media/'.format(base_url)) setattr(this_module, 'MEDIA_URL', '{}media/'.format(base_url))
setattr(this_module, 'STATIC_URL', '{}static/'.format(base_url)) setattr(this_module, 'STATIC_URL', '{}static/'.format(base_url))
update_urls() update_urls("/")
# ---------- END URL CONFIGURATION # ---------- END URL CONFIGURATION
......
...@@ -6,7 +6,7 @@ from .base import * ...@@ -6,7 +6,7 @@ from .base import *
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = TEMPLATES[0]['OPTIONS']['debug'] = True TEMPLATE_DEBUG = TEMPLATES[0]['OPTIONS']['debug'] = True
update_urls('/adim-dev/') update_urls('/adim-dev/', __name__)
ALLOWED_HOSTS = ['.unil.ch'] ALLOWED_HOSTS = ['.unil.ch']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment