On Jul 12, 3:43 pm, Russell Keith-Magee <russ...@keith-magee.com> wrote: > > Andre's idea is interesting and is certainly more readable. > > I'm having difficulty reconciling these two positions. My template tag > is too complex because it requires you to remember the idiom FORM X > FIELD Y USING Z; but a nested tag structure with 4 different subtags > is more readable and won't require reference to documentation to > understand how and when to use each subtag?
I think the other approach lends itself to a lot of non-DRY. For example, if you want to define the chrome of a single field you end up having to define *every single field* along with it. Example: {% form myform field A using X Z %} {% form myform field B %} {% form myform field C %} {% form myform field D %} {% form myform field E %} My idea with the form block tag was to allow a way to replace the chrome of a single field without having to define all the other fields. In other words, the above would just be: {% form myform %} {% using A = X Z %} {# Or whatever syntax looks good %} {% endform %} And the form would be rendered as {{ myform }} would, except with the chrome of the field A being replaced with X and Z. Perhaps this wasn't clear from my proposition. -- 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.