print errors on invalid forms?
authorSeth Woodworth <seth@sethish.com>
Thu, 21 Mar 2013 18:14:29 +0000 (14:14 -0400)
committerSeth Woodworth <seth@sethish.com>
Thu, 21 Mar 2013 18:14:29 +0000 (14:14 -0400)
karmaworld/apps/notes/views.py

index 50c301a9003a3bf0a71c66da72c1ae226054bc86..9a78b70a17a8b27579a5e6ce0f5445c32e19c8e7 100644 (file)
@@ -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 """