2👍
✅
Your __init__
method should be:
def __init__(self, variable, *args, **kwargs):
super(TestForm, self).__init__(*args, **kwargs)
I’m not sure if that’s your problem, or a typo in your question. Your example code means that the form will be initialised with data=args
.
Source:stackexchange.com