Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
ADIM
Commits
bb33a18a
Commit
bb33a18a
authored
Apr 30, 2015
by
Julien Furrer
Browse files
Fixed staging settings
parent
1804a884
Changes
2
Hide whitespace changes
Inline
Side-by-side
adim_project/adim_project/settings/base.py
View file @
bb33a18a
...
...
@@ -112,8 +112,8 @@ WSGI_APPLICATION = '%s.wsgi.application' % SITE_NAME
# ========== URL CONFIGURATION
#
def
update_urls
(
base_url
=
None
):
this_module
=
modules
[
__
name
__
]
def
update_urls
(
base_url
=
None
,
name
=
__name__
):
this_module
=
modules
[
name
]
if
base_url
is
None
:
base_url
=
getattr
(
this_module
,
'BASE_URL'
,
"/"
)
setattr
(
this_module
,
'SESSION_COOKIE_PATH'
,
base_url
)
...
...
@@ -121,7 +121,7 @@ def update_urls(base_url=None):
setattr
(
this_module
,
'MEDIA_URL'
,
'{}media/'
.
format
(
base_url
))
setattr
(
this_module
,
'STATIC_URL'
,
'{}static/'
.
format
(
base_url
))
update_urls
()
update_urls
(
"/"
)
# ---------- END URL CONFIGURATION
...
...
adim_project/adim_project/settings/staging.py
View file @
bb33a18a
...
...
@@ -6,7 +6,7 @@ from .base import *
DEBUG
=
True
TEMPLATE_DEBUG
=
TEMPLATES
[
0
][
'OPTIONS'
][
'debug'
]
=
True
update_urls
(
'/adim-dev/'
)
update_urls
(
'/adim-dev/'
,
__name__
)
ALLOWED_HOSTS
=
[
'.unil.ch'
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment