hi,

in my new forms I am doing custom validation. Some of these do not  
fit into the 'clean()' method, so I do it in the body of my view.  
Code is like this

if form.is_valid:
        if some cleaned_data['speaker'] does not pass test:
                form.errors['speaker'] = ['some error here']
        if not form.errors:
                savethe form

when I publish my form as form.as_table - the error appears correctly  
next to the 'speaker' widget. But when I break up the form like this:

                <dl>
                    {% for field in form %}
                        <dt>{{ field.label_tag }}</dt>

                        <dd>{{ field }}</dd>
                        {% if field.help_text %}<dd>{{ field.help_text }}</ 
dd>{% endif %}
                        {% if field.errors %}<dd>{{ field.errors }}</dd>{%  
endif %}
                    {% endfor %}
                </dl>
The error message does not display: The display is simply []
How do I solve this?

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: http://registration.fossconf.in/web/



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to