another option that doesn’t require you to manually call clean
is to use this:
name = models.CharField(max_length=100, blank=False, default=None)
blank
will prevent an empty string to be provided in the admin or using a form or serializer (most cases). However as pointed out in the comments, this unfortunately does not prevent things likemodel.name = ""
(manually setting blank string)default=None
will set name to None when using something likegroup = Group()
, thus raising an exception when callingsave