On Mon, Nov 23, 2009 at 7:16 AM, gentlestone <tibor.b...@hotmail.com> wrote: > why this piece of code doesn't work? > > {% for field in form|slice:":2" %} > > the result is iterating over all fields, not just the first two fields
Perhaps break this up into two parts? {% with form|slice:":2" as formslice %} (% for field in formslice %} -Doug > -- > > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=.