diff --git a/AUTHORS b/AUTHORS index acdca4ec19..834786736d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -809,6 +809,7 @@ answer newbie questions, and generally made Django that much better: pradeep.gowda@gmail.com Preston Holmes Preston Timmons + Priyank Panchal Priyansh Saxena Przemysław Buczkowski Przemysław Suliga diff --git a/django/contrib/admin/templates/registration/password_reset_confirm.html b/django/contrib/admin/templates/registration/password_reset_confirm.html index c93f9c4692..a07645c97a 100644 --- a/django/contrib/admin/templates/registration/password_reset_confirm.html +++ b/django/contrib/admin/templates/registration/password_reset_confirm.html @@ -16,20 +16,26 @@

{% translate "Please enter your new password twice so we can verify you typed it in correctly." %}

{% csrf_token %} -
+
- {{ form.new_password1.errors }} + {{ form.new_password1.errors }} +
{{ form.new_password1 }} +
- {{ form.new_password2.errors }} + {{ form.new_password2.errors }} +
{{ form.new_password2 }} +
+
+
-
+
{% else %} diff --git a/django/contrib/admin/templates/registration/password_reset_form.html b/django/contrib/admin/templates/registration/password_reset_form.html index 380441501e..0edfea8ec2 100644 --- a/django/contrib/admin/templates/registration/password_reset_form.html +++ b/django/contrib/admin/templates/registration/password_reset_form.html @@ -14,14 +14,18 @@

{% translate 'Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.' %}

{% csrf_token %} -
+
- {{ form.email.errors }} + {{ form.email.errors }} +
{{ form.email }} +
+
+
-
+
{% endblock %} diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index c329a187bb..aa30c413fa 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -3197,26 +3197,35 @@ Adding a password reset feature You can add a password reset feature to the admin site by adding a few lines to your URLconf. Specifically, add these four patterns:: + from django.contrib import admin from django.contrib.auth import views as auth_views path( "admin/password_reset/", - auth_views.PasswordResetView.as_view(), + auth_views.PasswordResetView.as_view( + extra_context={"site_header": admin.site.site_header} + ), name="admin_password_reset", ), path( "admin/password_reset/done/", - auth_views.PasswordResetDoneView.as_view(), + auth_views.PasswordResetDoneView.as_view( + extra_context={"site_header": admin.site.site_header} + ), name="password_reset_done", ), path( "reset///", - auth_views.PasswordResetConfirmView.as_view(), + auth_views.PasswordResetConfirmView.as_view( + extra_context={"site_header": admin.site.site_header} + ), name="password_reset_confirm", ), path( "reset/done/", - auth_views.PasswordResetCompleteView.as_view(), + auth_views.PasswordResetCompleteView.as_view( + extra_context={"site_header": admin.site.site_header} + ), name="password_reset_complete", ),