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
I have a formset for "confirming" multiple model instances by checking
a checkbox.
I'd like to show values of some fields as text and display a checkbox
for the confirmation boolean field.
I have a couple of ideas:
- somehow couple the instances and their corresponding formset forms
and access
2 matches
Mail list logo