From 9d604e1cc8486b61c2cd3e0fe86a77f4a62e6327 Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Mon, 25 Mar 2013 12:22:58 -0400 Subject: [PATCH] better debug messages for note form invalid --- karmaworld/apps/notes/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/karmaworld/apps/notes/views.py b/karmaworld/apps/notes/views.py index 0f9e37e..7a39dbe 100644 --- a/karmaworld/apps/notes/views.py +++ b/karmaworld/apps/notes/views.py @@ -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): -- 2.25.1