Ticket #7071: password-change-override-form.patch
File password-change-override-form.patch, 853 bytes (added by , 17 years ago) |
---|
-
django/contrib/auth/views.py
82 82 def password_reset_done(request, template_name='registration/password_reset_done.html'): 83 83 return render_to_response(template_name, context_instance=RequestContext(request)) 84 84 85 def password_change(request, template_name='registration/password_change_form.html' ):85 def password_change(request, template_name='registration/password_change_form.html', password_change_form=PasswordChangeForm): 86 86 new_data, errors = {}, {} 87 form = PasswordChangeForm(request.user)87 form = password_change_form(request.user) 88 88 if request.POST: 89 89 new_data = request.POST.copy() 90 90 errors = form.get_validation_errors(new_data)