Fix changing locale if using WSGIScriptAlias

In Fedora we are rooting the dashboard at /dashboard rather than
plain /. This changes the locale switcher to not reference the
absolute path /i18n

Change-Id: I8bb852fc84bf9991d9dcb3bddfc359c8674a87f9
This commit is contained in:
Cole Robinson 2012-03-08 13:32:08 -05:00
parent f52c857a3f
commit 424bf843dd
2 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}language_settings_form{% endblock %}
{% block form_action %}/i18n/setlang/{% endblock %}
{% block form_action %}{% url horizon:set_language %}{% endblock %}
{% block modal_id %}language_settings_modal{% endblock %}
{% block modal-header %}{% trans "Select Language" %}{% endblock %}

View File

@ -31,4 +31,6 @@ urlpatterns = patterns('horizon.views.auth',
name='auth_switch'))
urlpatterns += patterns('',
url(r'^i18n/setlang/$', 'django.views.i18n.set_language',
name="set_language"),
url(r'^i18n/', include('django.conf.urls.i18n')))