2👍
✅
You need to add that url+view in urls.py
as below
url(r'^user/password/reset/confirm/$',
'django.contrib.auth.views.password_reset_confirm'),
It presents a form for entering a new password.
You may also have to add this as well
url(r'^user/password/reset/complete/$',
'django.contrib.auth.views.password_reset_complete'),
1👍
You can also use the default urls defined in django.contrib.auth.urls
by including
(r'^accounts/', include('django.contrib.auth.urls')),
to your urls.py
.
The password_reset_confirm
pattern require 2 additional parameters for the uidb64
and the token
:
url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
'password_reset_confirm',
See also the answer here: What are the default URLs for Django's User Authentication system?
- [Django]-How can I create a button for a django admin action?
- [Django]-How to filter using an expression in Django
Source:stackexchange.com