Everyone seems to point to this guide for easy plug-in password reset: http://garmoncheg.blogspot.com.au/2012/07/django-resetting-passwords-with.html
So from what I've read, if you want it to function then the urls are all you need are 4 urls defined:
urlpatterns = patterns('',
. . .
url(r'^user/password/reset/$', 'django.contrib.auth.views.password_reset', {'post_reset_redirect' : '/user/password/reset/done/'}, name="password_reset"),
(r'^user/password/reset/done/$', 'django.contrib.auth.views.password_reset_done'),
(r'^user/password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm', {'post_reset_redirect' : '/user/password/done/'}),
(r'^user/password/done/$', 'django.contrib.auth.views.password_reset_complete'),
. . .
)
This does not seem to be working as I'm still getting the infamous
NoReverseMatch at /user/password/reset/
with this:
Reverse for 'password_reset_confirm' with arguments '()' and keyword arguments '{u'uidb64': 'NA', u'token': u'3ps-749165b2b39d4168f97f'}' not found. 1 pattern(s) tried: ['user/password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$']
Is there something depreciated already with the guide I put a link to at the top? Should I be importing anything to the urls.py file?
Your url pattern is using uidb36, but your reverse call is looking for uidb64. See the documentation for more information on this change in 1.6.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With