The class in django views.py is as follows, the default value of the database field is set, default=0, but it cannot be reflected after it is created in the database. The table creation statement in the database is as follows,
The database does not have a default value:
Search as follows. Django should not support setting default values. Too flexible, I don’t know if I am going to modify the table structure through SQL and there will be problems when operating these tables through ORM.