On Feb 14, 7:10 am, Collin Grady <[EMAIL PROTECTED]> wrote:
> Rock said the following:
>
> > Some thoughts:
>
> > Inplementing form.as_items returning a list of form lines would be
> > nice.
> > This allows a variety of custom formatting options. Examples:
>
> > <form>
> > {% for item in forms.as_items }}{{ item }} , {% endfor %}<br/>
> > <...submit directive...>
> > </form>
>
> > <form>
> > {{ item[0] }} -- {{ item[1] }} -- {{ item[2] }}<br/>
> > {{ item[3] }}<br/>
> > {{ item[4] }}&nbsp;&nbsp;<submit directive>
> > </form>
>
> These can already be done, just loop over the form, or use the manual
> items like {{ form.fieldname }}, {{ form.fieldname.label_tag }},
> {{ form.fieldname.errors }}, etc

This is what I do, but it does get a bit messy if I only want to
change the formatting of one form element and leave the rest alone.  I
know I'm going to have to list out all the fields myself in this case,
but having to insert a bunch of variables for each field can get a bit
repetitive. To be honest I haven't really sat down to work out a
better way to do this, but Malcolm's filter idea sounds like a good
place to start for me.

Cheers,
Nick
--~--~---------~--~----~------------~-------~--~----~
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