5👍
✅
According to the documentation, blank=False
is purely validation-related that works only on a form level.
See related threads:
27👍
Use a MinLengthValidator
:
from django.core.validators import MinLengthValidator
...
title = models.CharField(max_length=10, validators=[MinLengthValidator(1)])
- How to remove Add button in Django admin, for specific Model?
- Django runserver error when specifying port
- For the django admin, how do I add a field to the User model and have it editable in the admin?
- How to purge all tasks of a specific queue with celery in python?
Source:stackexchange.com