diff --git a/wagtail/wagtailadmin/templates/wagtailadmin/home.html b/wagtail/wagtailadmin/templates/wagtailadmin/home.html index ab855154e4..7428c7c959 100644 --- a/wagtail/wagtailadmin/templates/wagtailadmin/home.html +++ b/wagtail/wagtailadmin/templates/wagtailadmin/home.html @@ -20,7 +20,7 @@ {% endif %}

{% blocktrans %}Welcome to the {{ site_name }} Wagtail CMS{% endblocktrans %}

-

{{ user.get_full_name|default:user.username }}

+

{{ user.get_full_name|default:user.get_username }}

diff --git a/wagtail/wagtailadmin/templates/wagtailadmin/pages/edit.html b/wagtail/wagtailadmin/templates/wagtailadmin/pages/edit.html index 96ef819fde..51f9d8ba13 100644 --- a/wagtail/wagtailadmin/templates/wagtailadmin/pages/edit.html +++ b/wagtail/wagtailadmin/templates/wagtailadmin/pages/edit.html @@ -80,7 +80,7 @@ {% if page.get_latest_revision %} {% blocktrans with last_mod=page.get_latest_revision.created_at %}Last modified: {{ last_mod }}{% endblocktrans %} {% if page.get_latest_revision.user %} - {% blocktrans with modified_by=page.get_latest_revision.user.get_full_name|default:page.get_latest_revision.user.username %}by {{ modified_by }}{% endblocktrans %} + {% blocktrans with modified_by=page.get_latest_revision.user.get_full_name|default:page.get_latest_revision.user.get_username %}by {{ modified_by }}{% endblocktrans %} {% if page.get_latest_revision.user.email %} {% endif %} diff --git a/wagtail/wagtailusers/models.py b/wagtail/wagtailusers/models.py index 5e63e6af3f..7d0083e7e9 100644 --- a/wagtail/wagtailusers/models.py +++ b/wagtail/wagtailusers/models.py @@ -28,4 +28,4 @@ class UserProfile(models.Model): return cls.objects.get_or_create(user=user)[0] def __str__(self): - return self.user.username + return self.user.get_username() diff --git a/wagtail/wagtailusers/templates/wagtailusers/users/edit.html b/wagtail/wagtailusers/templates/wagtailusers/users/edit.html index 22ae8b3a7f..1a559c6b37 100644 --- a/wagtail/wagtailusers/templates/wagtailusers/users/edit.html +++ b/wagtail/wagtailusers/templates/wagtailusers/users/edit.html @@ -1,12 +1,12 @@ {% extends "wagtailadmin/base.html" %} {% load wagtailimages_tags %} {% load i18n %} -{% block titletag %}{% trans "Editing" %} {{ user.username}}{% endblock %} +{% block titletag %}{% trans "Editing" %} {{ user.get_username}}{% endblock %} {% block bodyclass %}menu-users{% endblock %} {% block content %} {% trans "Editing" as editing_str %} - {% include "wagtailadmin/shared/header.html" with title=editing_str subtitle=user.username merged=1 tabbed=1 icon="user" %} + {% include "wagtailadmin/shared/header.html" with title=editing_str subtitle=user.get_username merged=1 tabbed=1 icon="user" %}