None of this:
does you any good and can all be deleted.
(Side note - I’m hoping this is a copy/paste error, but these lines:
don’t show up as being indented in your view. If they’re not indented as part of your view, that is a mistake.)
The purpose of the formset is to allow the formset to generate the individual forms, including the construction of any specialization that may be necessary.
In the section for QuizForm
, I would recommend changing one of these variables named “options” to something else, just to avoid confusion. (Your “You in six months” will appreciate it.)
For actually creating “dynamic options” for forms, I suggest you read:
- Passing custom parameters to formset forms
- Pass different parameters to each form in formset
- Django formsets tutorial series: Foundations.
And you may also want to read the thread at Forms fields based on database content