Lachlan Cannon wrote:
> Lakin Wecker wrote:
> > as_dl() gets a +1 from me.  I've used definition lists for forms and
> > prefer it over tables. :)
>
> Maybe there needs to be an easy hook for people to specify their own way of
> laying a form out. It seems the as_ methods are gonna keep growing and 
> growing.

+1

What if instead of adding various as_* methods that we have a
FormFormatter class that determines how the form displays.  The
_html_output and as_* methods would become FormFormatters.   Formatter
could be a parameter to the Form constructor, and could default to the
table formatter like how it is now.  This would make Form display with
its FormFormatter similar to a form Field and its Widget.

This might even be something that would make sense as a setting,
default_formformatter.  Usually one would not be mixing and matching
more than one formatter for a given site.  If I wanted to change the
display of all the forms on my site, I could make the change in one
place instead of having to change all the as_p in my templates to
as_my_p.


--~--~---------~--~----~------------~-------~--~----~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to