Created
September 5, 2019 08:17
-
-
Save Narshe1412/c80121ccfa8a89ce53a9099a531dffd3 to your computer and use it in GitHub Desktop.
Urls for django password reset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls import url | |
from django.core.urlresolvers import reverse_lazy | |
from django.contrib.auth.views import password_reset, password_reset_done, password_reset_confirm, password_reset_complete | |
urlpatterns = [ | |
url(r'^$', password_reset, {'post_reset_redirect' : reverse_lazy('password_reset_done')}, name="password_reset"), | |
url(r'^done/$', password_reset_done, name="password_reset_done"), | |
url(r'^(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', password_reset_confirm, {'post_reset_confirm': reverse_lazy('password_reset_complete')}, name="password_reset_confirm"), | |
url(r'^complete$', password_reset_complete, name="password_reset_complete"), | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment