Post #2430700
2026-04-30 22:49 UTC
@davidism@mas.to 👇
> Avoid using null on string-based fields such as CharField and TextField. The #Django convention is to use an empty string, not NULL, as the “no data” state for string-based fields. If a string-based field has null=False, empty strings can still be saved for “no data”. If a string-based field has null=True, that means it has two possible values for “no data”: NULL, and the empty string. In most cases, it’s redundant to have two possible values for “no data”.
https://docs.djangoproject.com/en/stable/ref/models/fields/#django.db.models.Field.null
Replies (0)
No replies.