On Sun, Jun 7, 2009 at 12:57 PM, zayatzz <alan.kesselm...@gmail.com> wrote:

>
> I have this form:
>
> [snip form def]
> For some reason the view does not save the stuff i get with form and i
> want to figure out why.
>
> Perhaps form does not validate for some reason... Where or how can i
> see those validationerrors.. how can i get them appear in view?
>
> Is there a good example about it?
>

http://docs.djangoproject.com/en/dev/topics/forms/#using-a-form-in-a-view

shows the standard view processing where the bound form form is placed in
the template context for re-display when validation fails.  Simply using
something like form.as_p in the template will show the errors, or you can
get fancier with how you display things in the template (see further
examples on that page).

If you are using the development server and just want to see what code path
is being taken, you can simply add some print statements to your view code,
including printing values of things like form.errors.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to