# User password reset fail

**URL:** <https://forum.djangoproject.com/t/user-password-reset-fail/16068>\
**Category:** Forms & APIs\
**Created:** [September 20, 2022, 9:05am UTC](https://forum.djangoproject.com/t/user-password-reset-fail/16068 "2022-09-20T09:05:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cromwell1963](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/cromwell1963/32/10017_2.png) [@Cromwell1963](https://forum.djangoproject.com/u/Cromwell1963)\
**Post date:** [September 20, 2022, 9:05am UTC](https://forum.djangoproject.com/t/user-password-reset-fail/16068/1 "2022-09-20T09:05:42Z")

</div>

As I understand it; once user has been sent a reset email, and successfully reset their password, the PasswordResetCompleteView is displayed. But what is displayed if the reset fails. I have provided my own HTML for the other authentication URL but am not sure what to do about this one.  
Thanks

```auto

urlpatterns = [
    path('', views.home, name="home"),
    path('profiles/login/', auth_views.LoginView.as_view(template_name="profiles/login.html", next_page="home", redirect_authenticated_user=True), name='login'),
    path('profiles/logout/', auth_views.LogoutView.as_view(template_name="profiles/logout.html"), name='logout'),
    path('profiles/create_profile/', views.create_profile, name='create_profile'),
    path('profiles/password_change/', auth_views.PasswordChangeView.as_view(template_name="profiles/password_change.html"), name='password_change'),
    path('profiles/password_change/done/', auth_views.PasswordChangeDoneView.as_view(template_name="profiles/password_change_done.html"), name='password_change_done'),
    path('profiles/password_reset/', auth_views.PasswordResetView.as_view(template_name="profiles/password_reset.html"), name='password_reset'),
    path('profiles/password_reset/done/', auth_views.PasswordResetDoneView.as_view(template_name="profiles/password_reset_done.html"), name='password_reset_done'),
    path('profiles/reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    path('profiles/reset/done/', auth_views.PasswordResetCompleteView.as_view(template_name="profiles/password_reset_complete.html"), name='password_reset_complete'),
]

```

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [September 20, 2022, 10:52am UTC](https://forum.djangoproject.com/t/user-password-reset-fail/16068/2 "2022-09-20T10:52:11Z")

</div>

What do you mean by “if the reset fails”?

If the person doesn’t supply the same password in both fields, or if the password doesn’t satisfy the password requirements, the form is redisplayed showing the error message. (Typical Django form processing.)

---

<div class="post-metadata">

**Author:** ![Cromwell1963](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/cromwell1963/32/10017_2.png) [@Cromwell1963](https://forum.djangoproject.com/u/Cromwell1963)\
**Post date:** [September 20, 2022, 11:30am UTC](https://forum.djangoproject.com/t/user-password-reset-fail/16068/3 "2022-09-20T11:30:42Z")

</div>

I can’t remember now how I caused it, but i received a message saying the password could not be changed; The form submitted Ok but returned an error page. No matter what i try now i cant recreate it.  
I’ll have to come back to it if i see it again.  
thanks

---

<div class="post-metadata">

**Author:** ![Cromwell1963](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/cromwell1963/32/10017_2.png) [@Cromwell1963](https://forum.djangoproject.com/u/Cromwell1963)\
**Post date:** [September 22, 2022, 6:24am UTC](https://forum.djangoproject.com/t/user-password-reset-fail/16068/4 "2022-09-22T06:24:10Z")

</div>

I remembered what i did. I was testing the registration/password links and entered `reset/<uidb64>/<token>/` manually into my browser, and got the page saying:

> Password reset unsuccessful
> 
> The password reset link was invalid, possibly because it has already been used. Please request a new password reset.

Hopefully the user will not see this, but just in case, how would i go about styling it.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [September 22, 2022, 2:43pm UTC](https://forum.djangoproject.com/t/user-password-reset-fail/16068/5 "2022-09-22T14:43:26Z")

</div>

Actually, users will see it more than you think. It’s common for someone to request that link, and when they don’t get the email “right away” to reclick the link to send the email again - and then click on the link in the first email sent. (When I say “common”, we see duplicate requests for password reset emails within a 5-minute window more than 1% of the time. I don’t remember the exact percentage when we looked at that, but it was higher than any of us expected.)

Anyway, if you look at the original template, password\_reset\_confirm.html, in django.contrib.admin.templates.registration, you’ll see that message. If you override that template with your own you can change that message any way you like.

---

<div class="post-metadata">

**Author:** ![Cromwell1963](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/cromwell1963/32/10017_2.png) [@Cromwell1963](https://forum.djangoproject.com/u/Cromwell1963)\
**Post date:** [September 24, 2022, 6:08am UTC](https://forum.djangoproject.com/t/user-password-reset-fail/16068/6 "2022-09-24T06:08:58Z")

</div>

Excellent, thank you
