Created
October 5, 2010 19:54
-
-
Save joelklabo/612210 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#This is the function where the error is occurring: | |
# Doesn't need csrf_protect since no-one can guess the URL | |
def password_reset_confirm(request, uidb36=None, token=None, template_name='registration/password_reset_confirm.html', | |
token_generator=default_token_generator, set_password_form=SetPasswordForm, | |
post_reset_redirect=None): | |
""" | |
View that checks the hash in a password reset link and presents a | |
form for entering a new password. | |
""" | |
assert uidb36 is not None and token is not None # checked by URLconf | |
if post_reset_redirect is None: | |
post_reset_redirect = reverse('django.contrib.auth.views.password_reset_complete') | |
try: | |
uid_int = base36_to_int(uidb36) | |
except ValueError: | |
raise Http404 | |
user = get_object_or_404(User, id=uid_int) | |
context_instance = RequestContext(request) | |
if token_generator.check_token(user, token): | |
context_instance['validlink'] = True | |
if request.method == 'POST': | |
form = set_password_form(user, request.POST) | |
if form.is_valid(): | |
form.save() | |
return HttpResponseRedirect(post_reset_redirect) | |
else: | |
form = set_password_form(None) | |
else: | |
context_instance['validlink'] = False | |
form = None | |
context_instance['form'] = form | |
return render_to_response(template_name, context_instance=context_instance) | |
#This is the error: | |
Traceback (most recent call last): | |
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 100, in get_response | |
response = callback(request, *callback_args, **callback_kwargs) | |
File "/srv/www/brooski.net/brooski/registration/auth_views.py", line 144, in password_reset_confirm | |
post_reset_redirect = reverse('django.contrib.auth.views.password_reset_complete') | |
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 350, in reverse | |
*args, **kwargs))) | |
File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py", line 296, in reverse | |
"arguments '%s' not found." % (lookup_view_s, args, kwargs)) | |
NoReverseMatch: Reverse for 'django.contrib.auth.views.password_reset_complete' with arguments '()' and keyword arguments '{}' not found. | |
# How do i pass arguments to that fuction? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment