Checking if field allows null values ​​in Django

I am writing common functions (using the hasattr

, setattr

, getattr

...) to manage and update the field values for a given field of field_name

a particular model?

Is there a way to check if a field is allowed to my_model.field_name

empty values?


source to share

1 answer

Yes, in this way:





All Articles