Made the i18n url a fixed string, in Django 1.4 the named urlpattern does not exist yet. This looks like the best way to support all versions. Once 1.4 is deprecated we make this a revserse again.

This commit is contained in:
Martin Mahner 2014-10-28 11:36:19 +01:00
parent ea27bf9e0f
commit 6ca849cc91

View file

@ -17,9 +17,9 @@
<a href="https://github.com/bartTC/dpaste">github.com/bartTC/dpaste</a> <a href="https://github.com/bartTC/dpaste">github.com/bartTC/dpaste</a>
</p> </p>
<form action="{% url 'set_language' %}" method="post"> <form action="/i18n/setlang/" method="post">
{% csrf_token %}
Change the language: Change the language:
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}" /> <input name="next" type="hidden" value="{{ redirect_to }}" />
<select name="language"> <select name="language">
{% get_language_info_list for LANGUAGES as languages %} {% get_language_info_list for LANGUAGES as languages %}
@ -30,7 +30,7 @@
{% endfor %} {% endfor %}
</select> </select>
<input type="submit" value="Go" /> <input type="submit" value="Go" />
</form> </form>
<h3>API</h3> <h3>API</h3>