Here's the solution I'm using right now in my view. Not pretty.

    my_items = MyModel.objects.all()
    my_items_dict = dict((obj.pk, obj) for obj in my_items)
    formset = forms.formset_for_model(MyModel, extra=0)
(instances=my_items)
    pk_name = MyModel._meta.pk.attname
    for form in formset.forms:
        form.instance = my_items_dict[form.initial[pk_name]]


--~--~---------~--~----~------------~-------~--~----~
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