mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 20:06:35 +11:00
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:
parent
ea27bf9e0f
commit
6ca849cc91
1 changed files with 14 additions and 14 deletions
|
@ -17,20 +17,20 @@
|
|||
<a href="https://github.com/bartTC/dpaste">github.com/bartTC/dpaste</a>
|
||||
</p>
|
||||
|
||||
<form action="{% url 'set_language' %}" method="post">
|
||||
{% csrf_token %}
|
||||
Change the language:
|
||||
<input name="next" type="hidden" value="{{ redirect_to }}" />
|
||||
<select name="language">
|
||||
{% get_language_info_list for LANGUAGES as languages %}
|
||||
{% for language in languages %}
|
||||
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
|
||||
{{ language.name_local }} ({{ language.code }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
<form action="/i18n/setlang/" method="post">
|
||||
Change the language:
|
||||
{% csrf_token %}
|
||||
<input name="next" type="hidden" value="{{ redirect_to }}" />
|
||||
<select name="language">
|
||||
{% get_language_info_list for LANGUAGES as languages %}
|
||||
{% for language in languages %}
|
||||
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
|
||||
{{ language.name_local }} ({{ language.code }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
|
||||
<h3>API</h3>
|
||||
|
||||
|
|
Loading…
Reference in a new issue