On Mon, Mar 15, 2010 at 10:26 AM, Daniel Roseman <dan...@roseman.org.uk> wrote: > Assuming that 'groupA' is a model field, there's no such property as > 'selections.groupA', because as you've stated, selections is a > queryset - ie a collection of model instances, not a single one. > > However in general you'd be better off using Django's forms framework, > which outputs fields for you with all the correct attributes selected.
Co-incidentally I was asking a very similar question, I couldn't see any way to use the model information in a formset. In the first instance I'm just passing in the data, I assume it isn't possible to use that as variables elsewhere? Also, in the view, is it possible to reference a model associated with each form in the formset? This is a simplified version of the view: http://dpaste.com/172317/ That's aimed at taking in multiple events and multiple members, which is fine except that I can't see how to reference the members when: - In the form (template). - Iterating over the form information. E.g. this doesn't work: for entry_form in entry_formset.cleaned_data: this_member = members[entry_form] Any pointers appreciated, I can't find a similar instance in the docs. 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-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.