From ef376018bb9e14ffee70e4cbad2063eedf82a371 Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Thu, 21 Mar 2013 14:14:29 -0400 Subject: [PATCH] print errors on invalid forms? --- karmaworld/apps/notes/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/karmaworld/apps/notes/views.py b/karmaworld/apps/notes/views.py index 50c301a..9a78b70 100644 --- a/karmaworld/apps/notes/views.py +++ b/karmaworld/apps/notes/views.py @@ -57,6 +57,11 @@ class NoteSaveView(FormView, SingleObjectMixin): self.object.save() return super(NoteSaveView, self).form_valid(form) + def form_invalid(self, form): + """ Do stuff when the form is invalid !!! TODO """ + print self.form + print self.form.errors + class NoteView(View): """ Notes superclass that wraps http methods """ -- 2.25.1