if hasattr(form, 'name') and hasattr(form, 'date'):
print(form.name) #'Some name' - True
print(form.date) #none - False
This condition validates as True even if the hasattr(form, 'date')
is false.
What is the correct way to validate multiples hasattr?
If you have more than one value to check if it is a truthy attribute of an object, you can do like this