mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #26558 -- Removed need for request context processor on admin login page.
This commit is contained in:
committed by
Tim Graham
parent
ad0f536e1c
commit
1206eea11e
@@ -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):
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user