Le 03/06/2011 16:58, Gregor Müllegger a écrit :
Hi,

this is the second RFC regarding template form rendering API/syntax. The first
one defined how a complete form or a subset of fields will be rendered. I'm
now proposing more tags to render more details like only the label of a form
field.

Currently we haven't discussed how we will substitute what we currently do
with using::

{{ form.non_field_errors }}
{{ form.errors }}
{{ form.field.errors }}
{{ form.field.help_text }}
{{ form.field.label_tag }}


We will implement these with template tags that are aware of the currently
used layout:

Substituting {{ \*.errors }}::

{% formerrors<form instance|field instance|any ErrorList/ErrorDict>  %}

What about sharing primitives (templates) to display form errors and messages from the message framework?
In a way, form errors are a kind of error messages, aren't they?

To go further, I am wondering if, in future, forms could generate other types of messages, like warnings: they don't block the validation process but the user may pay attention to them. Maybe there could be a relationship between form validation and generation of a messages.SUCCESS too.

Benoit

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

Reply via email to