On Sun, 2008-03-02 at 02:24 -0800, Panos Laganakos wrote: > I am used to doing things like: > label for="id_title">Title:</label> {{ form.title }} > {% if form.username.errors %} > <span class="error">{{ form.username.errors|join:", " }}</span> > {% endif %} > > so, yeah :/ > > I thought if the form was bound (ie, in that case request.POST), it > should display the errors by itself.
Acessing either is_valid() or the errors attribute on the *form* (not on the BoundField instances) will cause the validation to be run. This is documented in the validation section of the newforms documentation. As I said, there's really no use-case where not checking is_valid() or forms.error before returning form your view makes sense, so this is hardly an onerous requirement. Malcolm -- He who laughs last thinks slowest. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---