Moved li tags inside optional_login

as per https://github.com/tomchristie/django-rest-framework/pull/1820#discussion_r16987993
This commit is contained in:
Carlton Gibson 2014-09-03 09:54:36 +02:00
parent 1e491c82e6
commit 4947303f20
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% optional_logout request user %} {% optional_logout request user %}
{% else %} {% else %}
<li>{% optional_login request %}</li> {% optional_login request %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}
</ul> </ul>

View File

@ -41,7 +41,7 @@ def optional_login(request):
except NoReverseMatch: except NoReverseMatch:
return '' return ''
snippet = "<a href='%s?next=%s'>Log in</a>" % (login_url, escape(request.path)) snippet = "<li><a href='%s?next=%s'>Log in</a></li>" % (login_url, escape(request.path))
return snippet return snippet