diff options
| author | Dan Stephenson <daniel.Stephenson@uk.rsagroup.com> | 2016-05-04 01:11:21 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-05-04 09:43:24 -0400 |
| commit | 1206eea11e506c4e740ba2f0c1feaa01452d804b (patch) | |
| tree | 4a249148dabf248ae7b53a86625619bf9cfbe7b3 /django | |
| parent | ad0f536e1c80e7122f03ae4746a90904a573b4b8 (diff) | |
Fixed #26558 -- Removed need for request context processor on admin login page.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/sites.py | 1 | ||||
| -rw-r--r-- | django/contrib/admin/templates/admin/login.html | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py index dbc0472ab7..aaa56f1296 100644 --- a/django/contrib/admin/sites.py +++ b/django/contrib/admin/sites.py @@ -361,6 +361,7 @@ class AdminSite(object): self.each_context(request), title=_('Log in'), app_path=request.get_full_path(), + username=request.user.get_username(), ) if (REDIRECT_FIELD_NAME not in request.GET and REDIRECT_FIELD_NAME not in request.POST): diff --git a/django/contrib/admin/templates/admin/login.html b/django/contrib/admin/templates/admin/login.html index 4c0dc63dcf..397eadf4a2 100644 --- a/django/contrib/admin/templates/admin/login.html +++ b/django/contrib/admin/templates/admin/login.html @@ -34,7 +34,7 @@ {% if user.is_authenticated %} <p class="errornote"> -{% blocktrans with username=request.user.get_username trimmed %} +{% blocktrans trimmed %} You are authenticated as {{ username }}, but are not authorized to access this page. Would you like to login to a different account? {% endblocktrans %} |
