On Mon, Jul 12, 2010 at 11:27 AM, Javier Guerra Giraldez
<jav...@guerrag.com> wrote:
> On Sun, Jul 11, 2010 at 9:23 PM, Russell Keith-Magee
> <russ...@keith-magee.com> wrote:
>>  * Duplication. The 'left_table' flag needs to be applied to every use
>> of the {% form %} tag on a page. If you're
>> manually rolling out every field on a form, this is a lot of code 
>> duplication.
>
> absolutely.  see my answer to André for an idea on this
>
>>  * Composibility. If I understand your intention, a form library would
>> need to provide all the layout schemes that you want to have available
>> on a page. That means if you wanted "P" and "UL" forms on the same
>> page, you would need to define a combined "P & UL" form library. This
>> sort of composition doesn't strike me as a desirable goal.
>
> no, the P, UL (and my hypothetical left_table) would each one be a
> class; you could import each one separately (or maybe several included
> by default).  in my example, left_table would inherit from as_table,
> simplifying the implementation.  the {%form%} syntax wouldn't be a
> parameter to a single renderer, it's a selector to choose which
> renderer to use.

I'm not sure I understand.

In my proposal, {% load custom_form %} loads a single form template
tag. That template tag implements a single specific rendering scheme.
You import library X, you get library X's layout. If you want a
different layout, you import a different library (namespaces being one
way to get around the 'multiple layouts in a single )

How are you getting your "as_p" renderer into your template? How is it
made available to the {% form %} tag as an argument? How does the
"selector" determine what is available for selection? What defines the
default behavior of {% form %} in the first place?

Yours,
Russ Magee %-)

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