当前位置: 首页 > 工具软件 > Label In > 使用案例 >

django:doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

阎佑运
2023-12-01

启动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',
]
 类似资料:

相关阅读

相关文章

相关问答