Skip to content

Bonjour, #1

Closed
wants to merge 1 commit into from
+5 −0
View
5 password_reset/views.py
@@ -7,6 +7,7 @@
from django.shortcuts import get_object_or_404
from django.template import loader
from django.views import generic
+from django.http import HttpResponseRedirect
from .forms import PasswordRecoveryForm, PasswordResetForm
@@ -84,6 +85,10 @@ def dispatch(self, request, *args, **kwargs):
self.user = get_object_or_404(User, pk=pk)
return super(Reset, self).dispatch(request, *args, **kwargs)
+ def form_valid(self, form):
+ form.save()
+ return HttpResponseRedirect(self.get_success_url())
+
def invalid(self):
return self.render_to_response(self.get_context_data(invalid=True))
Something went wrong with that request. Please try again.