diff --git a/django/contrib/admin/templates/registration/password_reset_confirm.html b/django/contrib/admin/templates/registration/password_reset_confirm.html index 20ef252b95..7de22336cf 100644 --- a/django/contrib/admin/templates/registration/password_reset_confirm.html +++ b/django/contrib/admin/templates/registration/password_reset_confirm.html @@ -19,6 +19,7 @@
{% csrf_token %}
+
{{ form.new_password1.errors }} diff --git a/tests/auth_tests/test_templates.py b/tests/auth_tests/test_templates.py index ec1a4e5b75..9651bf585d 100644 --- a/tests/auth_tests/test_templates.py +++ b/tests/auth_tests/test_templates.py @@ -52,6 +52,12 @@ class AuthTemplateTests(TestCase): response = client.get(url) self.assertContains(response, 'Enter new password') self.assertContains(response, '

Enter new password

') + # The username is added to the password reset confirmation form to help + # browser's password managers. + self.assertContains( + response, + '', + ) def test_PasswordResetCompleteView(self): response = PasswordResetCompleteView.as_view()(self.request)