1
I think you want to access the form fields in the __init__
method. You should access it from the fields
attribute. Like this:
class Test(forms.Form):
x = forms.CharField(max_length=20)
def __init__(self, *args, **kwargs):
super(Test, self).__init__(*args, **kwargs)
print self.fields['x']
Source:stackexchange.com