1👍
✅
You need to include auth.urls
,
path('...your path...', include('django.contrib.auth.urls')),
Note:
Inorder to use custom templates you need to make a directory named registration
inside the templates
directory,
path(
'password_reset',
auth_views.PasswordResetView.as_view(),
name='password_reset'
), # allows a user to reset their password by generating a one-time use link
path(
'password_reset_done',
auth_views.PasswordResetDoneView.as_view(),
name='password_reset_done'
), # after password reset email sent
path(
'password_reset_confirm/<uidb64>/<token>',
auth_views.PasswordResetConfirmView.as_view(
template_name='registration/password_reset_confirm.html'
),
name='password_reset_confirm'
), # present a form to enter new password
path(
'password_reset_complete',
auth_views.PasswordResetCompleteView.as_view(
template_name='registration/password_reset_complete.html'
),
name='password_reset_complete'
), # inform success
Source:stackexchange.com