null=True is the opposite of what you are asking for anyway. You can
use null=False, and the column will be created with the database's
version of:
NOT NULL
Which is the postgres spelling.
This will prevent the database from allowing a database NULL from
being stored there.
But it will NOT
Hello,
While setting up a new model I'm trying to have a strong data model.
One of the requirements is that a certain field cannot be null.
lastname = models.CharField(
blank=False,
default=None,
2 matches
Mail list logo