I'm calling my form, with additional parameter 'validate :
form = MyForm(request.POST, request.FILES, validate=True)
How should I write form's init method to have access to this parameter inside body of my form (for example in _clean method) ? This is what I came up with :
def __init__(self, *args, **kwargs):
try:
validate = args['validate']
except:
pass
if not validate:
self.validate = False
elif:
self.validate = True
super(MyForm, self).__init__(*args, **kwargs)