From 4947303f20fa1229cdbe4fddc811e3117f4ce276 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Wed, 3 Sep 2014 09:54:36 +0200 Subject: [PATCH] Moved li tags inside `optional_login` as per https://github.com/tomchristie/django-rest-framework/pull/1820#discussion_r16987993 --- rest_framework/templates/rest_framework/base.html | 2 +- rest_framework/templatetags/rest_framework.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 5a12277bc..a84ccf269 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -46,7 +46,7 @@ {% if user.is_authenticated %} {% optional_logout request user %} {% else %} -
  • {% optional_login request %}
  • + {% optional_login request %} {% endif %} {% endblock %} diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index f7332c3b5..c228d5c3d 100644 --- a/rest_framework/templatetags/rest_framework.py +++ b/rest_framework/templatetags/rest_framework.py @@ -41,7 +41,7 @@ def optional_login(request): except NoReverseMatch: return '' - snippet = "Log in" % (login_url, escape(request.path)) + snippet = "
  • Log in
  • " % (login_url, escape(request.path)) return snippet