I notice that forms.is_valid
only clean form for the first form in an if statement.
Example code :
if not user_detail_form.is_valid() and not user_location_form.is_valid():
return redirect('account:profile')
Accessing cleaned data of user_detail_form works but when accessing cleaned data of user_location_form, it throws an error stating that cleaned_data does not exists.
My question is
What causes this? and is there a workaround for this?