Fixed #26231 -- Used .get_username in admin login template.

This commit is contained in:
Sjoerd Job Postmus 2016-02-17 15:18:24 +01:00 committed by Tim Graham
parent ee69789f45
commit bbe136e1a2
2 changed files with 5 additions and 1 deletions

View File

@ -34,7 +34,7 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
<p class="errornote"> <p class="errornote">
{% blocktrans with username=request.user.username trimmed %} {% blocktrans with username=request.user.get_username trimmed %}
You are authenticated as {{ username }}, but are not authorized to You are authenticated as {{ username }}, but are not authorized to
access this page. Would you like to login to a different account? access this page. Would you like to login to a different account?
{% endblocktrans %} {% endblocktrans %}

View File

@ -42,3 +42,7 @@ Bugfixes
regressed in Django 1.9 (:ticket:`26253`). regressed in Django 1.9 (:ticket:`26253`).
* Fixed ``BoundField`` to reallow slices of subwidgets (:ticket:`26267`). * Fixed ``BoundField`` to reallow slices of subwidgets (:ticket:`26267`).
* Changed the admin's "permission denied" message in the login template to use
``get_username`` instead of ``username`` to support custom user models
(:ticket:`26231`).