Ticket #10026: django_contrib_auth_views.diff
File django_contrib_auth_views.diff, 1.4 KB (added by , 16 years ago) |
---|
-
django/contrib/auth/views.py
116 116 raise Http404 117 117 118 118 user = get_object_or_404(User, id=uid_int) 119 context_instance = RequestContext(request)119 #context_instance = RequestContext(request) 120 120 121 121 if token_generator.check_token(user, token): 122 context_instance['validlink'] = True 122 #context_instance['validlink'] = True 123 validlink = True 123 124 if request.method == 'POST': 124 125 form = set_password_form(user, request.POST) 125 126 if form.is_valid(): … … 128 129 else: 129 130 form = set_password_form(None) 130 131 else: 131 context_instance['validlink'] = False 132 #context_instance['validlink'] = False 133 validlink = False 132 134 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)) 135 138 136 139 def password_reset_complete(request, template_name='registration/password_reset_complete.html'): 137 140 return render_to_response(template_name, context_instance=RequestContext(request,