启动django 时,报错如下:
RuntimeError: Model class addresstest.models.address_info doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
需要在 settings.py 中的INSTALLED_APPS 添加 app包名称: addresstest
解决方案:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'addresstest',
]