Commit 911a77fc authored by Sjoerd Job Postmus's avatar Sjoerd Job Postmus Committed by Tim Graham
Browse files

[1.9.x] Fixed #26231 -- Used .get_username in admin login template.

Backport of bbe136e1 from master
parent a23b387e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@

{% if user.is_authenticated %}
<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
    access this page. Would you like to login to a different account?
{% endblocktrans %}
+4 −0
Original line number Diff line number Diff line
@@ -42,3 +42,7 @@ Bugfixes
  regressed in Django 1.9 (:ticket:`26253`).

* 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`).