Reputation: 1758
I know about the prefix
argument we can pass while instantiating the form. My requirements are slightly different.
I have two forms like this
class TwitterForm(forms.Form):
friends = forms.Charfield(...)
class FBForm(forms.Form):
friends = forms.Charfield(...)
They will always be present together, which means I can guarantee that I will need to prefix
them. Is there a way to add a prefix at class level rather than at the object creation time.
Upvotes: 0
Views: 151
Reputation: 799520
Override __init__()
and add the keyword argument before calling the parent's method.
Upvotes: 1