[Fixed]-How to loop over a queryset for instantiate all formset?

1👍

You could try:

formset = ReplyFormSet(queryset=Reply.objects.filter(question__in=questions))

Using the in filter you get every question which is in questions queryset.

👤doru

Leave a comment