【发布时间】:2019-10-30 09:51:10
【问题描述】:
我正在安装 django rest 框架,当我在 settings.py 的 INSTALLED_APPS 中添加 rest-framework 时,我收到如下错误:
Watching for file changes with StatReloader
Exception in thread Thread-1:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'rest-framework'
Traceback (most recent call last):
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
有什么想法吗?
【问题讨论】:
-
在 settings.py 中显示
INSTALLED_APPS。
标签: python django django-rest-framework