better debug messages for note form invalid
authorSeth Woodworth <seth@sethish.com>
Mon, 25 Mar 2013 16:22:58 +0000 (12:22 -0400)
committerSeth Woodworth <seth@sethish.com>
Mon, 25 Mar 2013 16:22:58 +0000 (12:22 -0400)
karmaworld/apps/notes/views.py

index 0f9e37e2e4f9b1c2193ee56c4fca659ada49db10..7a39dbee81e67ffbfec7dba3e559fd007a6b0dc7 100644 (file)
@@ -24,7 +24,6 @@ class NoteSaveView(FormView, SingleObjectMixin):
         behaves the same as NoteDetailView, except for saving the
         NoteForm ModelForm
     """
-    # TODO: implement def form_invalid for returning a form with input and error
     form_class = NoteForm
     model = Note
     template_name = 'notes/note_detail.html'
@@ -60,9 +59,10 @@ class NoteSaveView(FormView, SingleObjectMixin):
 
     def form_invalid(self, form):
         """ Do stuff when the form is invalid !!! TODO """
+        # TODO: implement def form_invalid for returning a form with input and error
         print "running form_invalid"
-        print self.form
-        print self.form.errors
+        print form
+        print form.errors
 
 
 class NoteView(View):