Re: how to add a non-field text property to forms in a formset
I am so dense sometimes...
I had forgotten that initial data in a formset is a *list* of
dictionaries.
So I set up the initial data in a loop over the available products,
and created a parallel list of product_descriptions in the same loop.
Then set up the formset, and looped over formset.forms adding the
parallel form.product_description to each.
Don't know why I didn't think of that at before I got stumped. But
thanks again for leading me through the possibilities.
Might still be an simpler way to do it, but that way was simple enough.
--
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