python - 在 heroku 上创建超级用户时,我收到错误 ModuleNotFoundError: No module named 'rest_framework'
问题描述
我已经使用 python 和 python3 安装了 djangorestframework。此错误仅在使用时出现
heroku 运行 python manage.py createsuperuser
我也试过 heroku run python3 manage.py createsuperuser
设置.py:
INSTALLED_APPS = [
'rest_framework',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework.authtoken',
'core',
]
解决方案
推荐阅读
- asp.net-core - 生成 CrypoAPI (CAPI) 私钥
- asp.net - CLR 类型到 EDM 类型的映射是不明确的,因为有多个 CLR 类型;没有找到解决方案
- python - 如何使用 pytest 在循环中使用断言
- html - 悬停时显示全尺寸图像
- powerbi - 在 Power BI 中使用 USERNAME() 测量 if 条件
- php - PHP如何根据其他数组值按名称选择数组并将内容分配给变量?
- c# - 如何在记录中使用 foreach
在 TypeScript 和 Angular 中? - android - 是否可以将 Espresso 作为模块实现为我的 Mavan 自动化项目的一部分
- javascript - 如何解决数据库连接错误[SequelizeConnectionError]?
- java - 从数组列表创建重复记录