I *think*, I'm starting to get it :)

Found what was keeping the 'required_field' errors from showing
though:

    if request.method is 'POST':

should be:

    if request.method == 'POST':


yeah, I know...

On Mar 2, 12:41 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> 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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to