mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 00:04:16 +03:00
Moved li tags inside optional_login
as per https://github.com/tomchristie/django-rest-framework/pull/1820#discussion_r16987993
This commit is contained in:
parent
1e491c82e6
commit
4947303f20
|
@ -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>
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user