|
77 | 77 | re_path(r'^accounts/confirmation$', views.confirmation, name="confirmation"),
|
78 | 78 |
|
79 | 79 | # 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() |
99 | 99 |
|
100 | 100 | # root files (could also copy root_files/* to /staticfiles in run_collectstatic build script for production, but this seems more explicit)
|
101 | 101 | re_path(r"^favicon\.ico$", serve, {"document_root": settings.ROOT_ASSETS_DIR, "path": "favicon.ico"}),
|
|
0 commit comments