I'm writing generic functions (using hasattr, setattr, getattr ...), in order to manage and update field values for a given field field_name of a certain model?
hasattr
setattr
getattr
field_name
Is there a way to check if the field my_model.field_name allows null values?
my_model.field_name
Yes, this way:
ModelName._meta.get_field('field_name').null