[Solved]-Passing Instance to Django formset

10👍

5👍

I have used it as follows the formset used is inlineformset_factory.

q = Projects.objects.get(pk=project)

formset = PayFormSet(prefix='payment',instance=q)

and then pass the formset to the template

Leave a comment