From: Seth Woodworth Date: Mon, 25 Mar 2013 16:22:58 +0000 (-0400) Subject: better debug messages for note form invalid X-Git-Tag: release-20150131~473 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9d604e1cc8486b61c2cd3e0fe86a77f4a62e6327;p=oweals%2Fkarmaworld.git better debug messages for note form invalid --- 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):