The slice filter only works on lists and apparently form is not a list, probably a dictionary (that's why you can use form.last_name, for exmaple).
May be you find useful the hidden_fields() and visible_fields() functions described here: http://docs.djangoproject.com/en/1.2/topics/forms/#looping-over-hidden-and-visible-fields Good luck, Santiago. On Mon, Jul 5, 2010 at 4:07 PM, Chris Seberino <cseber...@gmail.com> wrote: > How interate over just a slice of form fields in template? > > I tried {% for e in form|slice:":5" %} but it appears the slice part > is just ignored. > > cs > > -- > 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<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- 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=en.