(models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
在settings.py中添加:
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
此时发现已经不在报错了。
(models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
在settings.py中添加:
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
此时发现已经不在报错了。