On Jun 3, 8:57 am, Russell Keith-Magee <russ...@keith-magee.com>
wrote:
> 5. Parameters "template" and "attrs" for forms, formsets, fieldsets,
> forms, (bound) fields and widgets
> 6. Support for (X)HTML5 and legacy HTML
>
> I strongly suspect that these two may be covered by something I
> discussed with Jacob at DjangoCon. Broadly, the proposal is to
> deprecate the {{ field }} and {{ form }} approach to template
> rendering in favor of a template tag {% render field %} and  {% render
> form %}; these template tags would allow you to customize the way that
> individual fields, fieldsets and forms are rendered, including
> controlling doctype compliance.
>
> If you want to override the way fields or forms are rendered, you will
> be able to subclass the base render template tag, override the
> rendering behavior, and re-register the tag (or register it under a
> different name).

Great! This one is a high priority for me (my designer keeps harping
on me about that markup he can't control), and I am happy to help make
it happen. Looking forward to seeing the results of your tinkering. If
those tags could optionally take a template name as argument, I think
that would cover the vast majority of customization use-cases without
any need for subclassing or re-registering the template tag.

Personally I'd love to also see the default widgets rendered by
templates, so a normal template override of a predictably-named
builtin template is all that's needed to customize the rendering of a
given widget. But there might be performance issues there if the
caching template loader isn't used, and that isn't enabled by default.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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