I have a problem getting password_Reset_confirm bit working.
url:
(r\'^password_reset/$\', \'django.contrib.auth.views.password_reset\'),
(r\'^passwo
It might be a built-in view, but you still need a URL for it. You should define one in urls.py and link it up to the password_reset_confirm
view.
When using the url
template tag, you need to specify the view and not the url itself. Since you are using 'django.contrib.auth.views.password_reset_confirm'
in your URLConf you should use it like this:
{% url 'django.contrib.auth.views.password_reset_confirm' ... %}
More on the url
template tag on Django's Built-in template tags and filters documentation.
To pass a url to the url
template tag, you can specify a name
to the url in the urls.py
url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
views.password_reset_confirm, name='password_reset_confirm'),
and then you can use the tag with the url name
{% url 'password_reset_confirm' uidb64=uid token=token %}
Just copy this URL to your main urls.py file, so that it recognizes the URL name
url(r'^reset/(?P[0-9A-Za-z_-]+)/(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'django.contrib.auth.views.password_reset_confirm', name='password_reset_confirm'),
Be sure to have this in your urls.py:
urlpatterns = [
url('^', include('django.contrib.auth.urls'))
]
See https://docs.djangoproject.com/en/1.8/topics/auth/default/#django.contrib.auth.views.password_reset Section: Authentication views