Ticket #10026: django_contrib_auth_views.diff

File django_contrib_auth_views.diff, 1.4 KB (added by Jason Mayfield, 16 years ago)
  • django/contrib/auth/views.py

     
    116116        raise Http404
    117117
    118118    user = get_object_or_404(User, id=uid_int)
    119     context_instance = RequestContext(request)
     119    #context_instance = RequestContext(request)
    120120
    121121    if token_generator.check_token(user, token):
    122         context_instance['validlink'] = True
     122        #context_instance['validlink'] = True
     123        validlink = True
    123124        if request.method == 'POST':
    124125            form = set_password_form(user, request.POST)
    125126            if form.is_valid():
     
    128129        else:
    129130            form = set_password_form(None)
    130131    else:
    131         context_instance['validlink'] = False
     132        #context_instance['validlink'] = False
     133        validlink = False
    132134        form = None
    133     context_instance['form'] = form   
    134     return render_to_response(template_name, context_instance=context_instance)
     135    #context_instance['form'] = form   
     136    #return render_to_response(template_name, context_instance=context_instance)
     137    return render_to_response(template_name, {'validlink': validlink, 'form': form}, context_instance=RequestContext(request))
    135138
    136139def password_reset_complete(request, template_name='registration/password_reset_complete.html'):
    137140    return render_to_response(template_name, context_instance=RequestContext(request,
Back to Top