I've established a variable inside my def init function inside my form that I want to be able to access within def clean() in that same form.
def __init__(self, *args, **kwargs):
super(UserOrderForm, self).__init__(*args, **kwargs)
car = 'BMW'
def clean(self):
cleaned_data = super(UserOrderForm, self).clean()
print(car)
When I print car, I'm told that
name 'car' is not defined
Is there a way to do this?
Thanks!