Skip to content

Instantly share code, notes, and snippets.

@Narshe1412
Created September 5, 2019 08:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Narshe1412/c80121ccfa8a89ce53a9099a531dffd3 to your computer and use it in GitHub Desktop.
Save Narshe1412/c80121ccfa8a89ce53a9099a531dffd3 to your computer and use it in GitHub Desktop.
Urls for django password reset
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