Sunday, March 14, 2010

passing more information with formsets

Hi,

I have a formset that is working well, but I'd like to use other
information within that loop:

{% for form in formset.forms %}
<fieldset>
<legend>[Member name would go here]</legend>
<table class="form">
{{ form }}
</table>
</fieldset>
{% endfor %}

There is a queryset of member objects from the same view that matches
the forms in the formset, but I assume I can't do a loop within the
loop?

Is there a way to loop through the members at the same time? Or some
other way of accessing the matching objects?

Hopefully it's probably a simple python thing, but I'm fairly new to
python/django.

Kind regards,

-Alastair

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate