gpt4 book ai didi

python - 如何停止 Django "app not found"错误?

转载 作者:太空宇宙 更新时间:2023-11-03 19:37:14 25 4
gpt4 key购买 nike

当我运行python ./manage.py sql grading时,我的django网站出现:

Error: App with label grading could not be found. Are you sure you INSTALLED_APPS setting is correct?

我使用 __init__.py 和所有内容对应用程序进行评分,我安装的应用程序是:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'teachline.courses',
'teachline.grading',
)

为什么这不起作用?

最佳答案

好的,我发现出了什么问题。我运行了python manage.py shell并尝试导入tealine.grading.models。事实证明我在导入模块时遇到了一些问题。我修复了这些问题,现在 python manage.py sql grading 工作正常。

关于python - 如何停止 Django "app not found"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2943211/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com