On Tue, 2008-09-30 at 08:05 -0700, SnappyDjangoUser wrote:
> Hi Malcolm,
> 
> You suggested:
> 
> > set up the data structures
> > you pass to your view a bit differently so that you can loop over the
> > forms and the products simultaneously (that is, pull apart the formset
> > forms and zip them together with the product entries in the view).
> 
> This is exactly what I like to do!  I am still a bit confused on exact
> implementation, however, because I have not found a way in Django to
> loop through 2 structures at once in a template.

You don't loop through two structures at once in your template. I
suggested you change the datastructures in your (Python) view so that
you only loop through one data structure that happens to be a sequence
of pairs. Each pair contains on of the forms and one of the queryset
members. You do all the data structure munging at the Python level, not
at the template level.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to