diff options
| author | Carlton Gibson | 2014-09-03 09:54:36 +0200 |
|---|---|---|
| committer | Carlton Gibson | 2014-09-03 09:54:36 +0200 |
| commit | 4947303f20fa1229cdbe4fddc811e3117f4ce276 (patch) | |
| tree | 8c5e3dd8a175b5224fe473d4f7d0ce19878dd82e | |
| parent | 1e491c82e6ddf2941d1f8639920c6b5dfd9378f8 (diff) | |
| download | django-rest-framework-4947303f20fa1229cdbe4fddc811e3117f4ce276.tar.bz2 | |
Moved li tags inside `optional_login`
as per https://github.com/tomchristie/django-rest-framework/pull/1820#discussion_r16987993
| -rw-r--r-- | rest_framework/templates/rest_framework/base.html | 2 | ||||
| -rw-r--r-- | 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 5a12277b..a84ccf26 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 %} - <li>{% optional_login request %}</li> + {% optional_login request %} {% endif %} {% endblock %} </ul> diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index f7332c3b..c228d5c3 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 = "<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 |
