upgrade template to django 1.5 url syntax

This commit is contained in:
Simone Federici
2014-06-15 10:38:26 +02:00
parent 86afb71314
commit 320c701d12
6 changed files with 9 additions and 9 deletions

View File

@@ -195,14 +195,14 @@
{% trans "Anonymous" %}
{% else %}
{{ user.get_full_name|default:user }}
<a href="{% url current_user_details %}" title="{% trans 'User details' %}"><span class="famfam active famfam-vcard"></span></a>
<a href="{% url 'current_user_details' %}" title="{% trans 'User details' %}"><span class="famfam active famfam-vcard"></span></a>
{% endif %}
</li>
{% get_setting "MIDDLEWARE_CLASSES" as middleware_classes %}
{% if "django.middleware.locale.LocaleMiddleware" in middleware_classes %}
<li>
<form action="{% url set_language %}" method="post">{% csrf_token %}
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
<select name="language" onchange="this.form.submit()">
{% for lang in LANGUAGES %}
<option value="{{ lang.0 }}" {% if lang.0 == LANGUAGE_CODE %}selected="selected"{% endif %}>{{ lang.0|language_name_local|capfirst }}</option>
@@ -212,7 +212,7 @@
</li>
{% endif %}
{% get_setting "LOGIN_URL" as login_url %}
<li><a class="logout" href="{% if not user.is_authenticated %}{% url login_view %}?next=/{% else %}{% url logout_view %}{% endif %}">{% if not user.is_authenticated %}{% trans "Login" %}{% else %}{% trans "Logout" %}{% endif %}</a></li>
<li><a class="logout" href="{% if not user.is_authenticated %}{% url 'login_view' %}?next=/{% else %}{% url 'logout_view' %}{% endif %}">{% if not user.is_authenticated %}{% trans "Login" %}{% else %}{% trans "Logout" %}{% endif %}</a></li>
{% endblock %}
{% block web_theme_main_navigation %}