Bonjour, #1

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+5 −0
Diff settings

Always

Just for now

View
@@ -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))