url(r'^password/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
auth_views.password_reset_confirm,
name='password_reset_confirm'),
On Thursday, 30 January 2014 18:39:12 UTC+5:30, heidi wrote:
-- auth_views.password_reset_
name='password_reset_confirm')
Try setting 'name' for the above url block as 'auth_password_reset_confirm'
On Thursday, 30 January 2014 18:39:12 UTC+5:30, heidi wrote:
I'm using Django 1.6.1, and password reset is not working. When users enter their email, 502 occurs and this is sent to me:Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/ handlers/base.py", line 114, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/ decorators.py", line 99, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/ auth/views.py", line 158, in password_reset
form.save(**opts)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/ auth/forms.py", line 256, in save
email = loader.render_to_string(email_template_name, c)
File "/usr/local/lib/python2.7/dist-packages/django/template/ loader.py", line 164, in render_to_string
return t.render(Context(dictionary))
File "/usr/local/lib/python2.7/dist-packages/django/template/ base.py", line 140, in render
return self._render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/ base.py", line 134, in _render
return self.nodelist.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/ base.py", line 840, in render
bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/dist-packages/django/template/ base.py", line 854, in render_node
return node.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/ defaulttags.py", line 447, in render
six.reraise(*exc_info)
File "/usr/local/lib/python2.7/dist-packages/django/template/ defaulttags.py", line 433, in render
url = reverse(view_name, args=args, kwargs=kwargs, current_app=context.current_app)
File "/usr/local/lib/python2.7/dist-packages/django/core/ urlresolvers.py", line 509, in reverse
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/usr/local/lib/python2.7/dist-packages/django/core/ urlresolvers.py", line 429, in _reverse_with_prefix
(lookup_view_s, args, kwargs, len(patterns), patterns))
NoReverseMatch: Reverse for 'auth_password_reset_confirm' with arguments '('MQ', u'3op-83ceb0bee07385a12e2a')' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Relevant parts of urls.py:url(r'^login/$',
auth_views.login,
{'template_name': 'registration/login.html'},
name='auth_login'),
url(r'^logout/$',
auth_views.logout,
{'template_name': 'registration/logout.html'},
name='auth_logout'),
url(r'^password/change/$',
auth_views.password_change,
name='auth_password_change'),
url(r'^password/change/done/$',
auth_views.password_change_done,
name='password_change_done'),
url(r'^password/reset/$',
auth_views.password_reset,
name='auth_password_reset'),
url(r'^password/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P< token>[0-9A-Za-z]{1,13}-[0-9A- Za-z]{1,20})/$',
auth_views.password_reset_confirm,
name='password_reset_confirm'),
url(r'^password/reset/complete/$',
auth_views.password_reset_complete,
name='auth_password_reset_complete'),
url(r'^password/reset/done/$',
auth_views.password_reset_done,
name='password_reset_done'),
As far as I can see I have it correctly updated for the latest version of Django. What's wrong, and how do I fix it?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8208563a-0805-4f93-bcd1-b736d4c6ae4a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment