Skip to content

Commit 2d84c23

Browse files
authored
uncomment & update password reset views (#76)
1 parent 253552a commit 2d84c23

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

layup_list/urls.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,25 @@
7777
re_path(r'^accounts/confirmation$', views.confirmation, name="confirmation"),
7878

7979
# password resets
80-
# re_path(r'^accounts/password/reset/$', authviews.password_reset,
81-
# {
82-
# 'post_reset_redirect': '/accounts/password/reset/done/',
83-
# 'template_name': 'password_reset_form.html',
84-
# 'html_email_template_name': 'password_reset_email.html',
85-
# 'email_template_name': 'password_reset_email.html',
86-
# },
87-
# name="password_reset"),
88-
# re_path(r'^accounts/password/reset/done/$', authviews.password_reset_done,
89-
# {'template_name': 'password_reset_done.html'}),
90-
# re_path(r'^accounts/password/reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
91-
# authviews.password_reset_confirm,
92-
# {
93-
# 'post_reset_redirect': '/accounts/password/done/',
94-
# 'template_name': 'password_reset_confirm.html'
95-
# },
96-
# name="password_reset_confirm"),
97-
# re_path(r'^accounts/password/done/$', authviews.password_reset_complete,
98-
# {'template_name': 'password_reset_complete.html'}),
80+
re_path(r'^accounts/password/reset/$', authviews.PasswordResetView.as_view(),
81+
{
82+
'post_reset_redirect': '/accounts/password/reset/done/',
83+
'template_name': 'password_reset_form.html',
84+
'html_email_template_name': 'password_reset_email.html',
85+
'email_template_name': 'password_reset_email.html',
86+
},
87+
name="password_reset"),
88+
re_path(r'^accounts/password/reset/done/$', authviews.PasswordResetDoneView.as_view(),
89+
{'template_name': 'password_reset_done.html'}, name="password_reset_done"), # explicitly set name that matches reverse_lazy() — has been strictly required since Django 2.0+
90+
re_path(r'^accounts/password/reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
91+
authviews.PasswordResetConfirmView.as_view(),
92+
{
93+
'post_reset_redirect': '/accounts/password/done/',
94+
'template_name': 'password_reset_confirm.html'
95+
},
96+
name="password_reset_confirm"),
97+
re_path(r'^accounts/password/done/$', authviews.PasswordResetCompleteView.as_view(),
98+
{'template_name': 'password_reset_complete.html'}, name="password_reset_complete"), # explicitly set name that matches reverse_lazy()
9999

100100
# root files (could also copy root_files/* to /staticfiles in run_collectstatic build script for production, but this seems more explicit)
101101
re_path(r"^favicon\.ico$", serve, {"document_root": settings.ROOT_ASSETS_DIR, "path": "favicon.ico"}),

0 commit comments

Comments
 (0)