(models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.

框架 django

开发语言 python

WARNINGS:
customer.customers: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
    HINT: Configure the DEFAULT_AUTO_FIELD setting or the CustomersConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.

System check identified 1 issue (0 silenced).

settings.py文件里面添加下面的的内容即可解决

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'