Merge "Simplify setting of urls"
This commit is contained in:
commit
ba53673ea1
@ -47,9 +47,6 @@ describe 'horizon' do
|
||||
it 'generates local_settings.py' do
|
||||
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
|
||||
'DEBUG = False',
|
||||
"LOGIN_URL = '#{platforms_params[:root_url]}/auth/login/'",
|
||||
"LOGOUT_URL = '#{platforms_params[:root_url]}/auth/logout/'",
|
||||
"LOGIN_REDIRECT_URL = '#{platforms_params[:root_url]}/'",
|
||||
"ALLOWED_HOSTS = ['foo.example.com', ]",
|
||||
'HORIZON_CONFIG["password_autocomplete"] = "off"',
|
||||
"SECRET_KEY = secret_key.generate_or_read_from_file('#{platforms_params[:secret_key_file]}')",
|
||||
@ -723,7 +720,7 @@ describe 'horizon' do
|
||||
|
||||
it 'sets WEBROOT in local_settings.py' do
|
||||
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
|
||||
"WEBROOT = '/dashboard/'",
|
||||
"WEBROOT = '/dashboard'",
|
||||
])
|
||||
end
|
||||
end
|
||||
@ -739,7 +736,7 @@ describe 'horizon' do
|
||||
|
||||
it 'sets WEBROOT in local_settings.py' do
|
||||
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
|
||||
"WEBROOT = '/horizon/'",
|
||||
"WEBROOT = '/horizon'",
|
||||
])
|
||||
end
|
||||
end
|
||||
|
@ -12,29 +12,7 @@ DEBUG = <%= @django_debug.to_s.capitalize %>
|
||||
SITE_BRANDING = '<%= @site_branding %>'
|
||||
|
||||
<% end -%>
|
||||
# WEBROOT is the location relative to Webserver root
|
||||
# should end with a slash.
|
||||
#LOGIN_URL = WEBROOT + 'auth/login/'
|
||||
#LOGOUT_URL = WEBROOT + 'auth/logout/'
|
||||
<% if @root_url == '/' -%>
|
||||
WEBROOT = '/'
|
||||
LOGIN_URL = '/auth/login/'
|
||||
LOGOUT_URL = '/auth/logout/'
|
||||
<% else -%>
|
||||
WEBROOT = '<%= @root_url %>/'
|
||||
LOGIN_URL = '<%= @root_url %>/auth/login/'
|
||||
LOGOUT_URL = '<%= @root_url %>/auth/logout/'
|
||||
<% end -%>
|
||||
|
||||
# LOGIN_REDIRECT_URL can be used as an alternative for
|
||||
# HORIZON_CONFIG.user_home, if user_home is not set.
|
||||
# Do not set it to '/home/', as this will cause circular redirect loop
|
||||
#LOGIN_REDIRECT_URL = WEBROOT
|
||||
<% if @root_url == '/' -%>
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
<% else -%>
|
||||
LOGIN_REDIRECT_URL = '<%= @root_url %>/'
|
||||
<% end -%>
|
||||
WEBROOT = '<%= @root_url %>'
|
||||
|
||||
# Required for Django 1.5.
|
||||
# If horizon is running in production (DEBUG is False), set this
|
||||
|
Loading…
x
Reference in New Issue
Block a user