我有一个新的 Django 应用,在我的 settings.py
中有以下模块:
INSTALLED_APPS = [
'djangoformsetjs',
'widget_tweaks',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_hosts',
'rest_framework',
'djoser',
'app', # Enable the inner app
'phonenumber_field',
]
尝试第一次上传到 Heroku 时,它返回错误:
ModuleNotFoundError: No module named 'djangoformsetjs'
虽然它在本地运行良好。我尝试从终端重新安装:pip install django-formset-js
一切似乎都很好:
Requirement already satisfied: django-formset-js in /Users/homepc/opt/anaconda3/lib/python3.8/site-packages (0.5.0)
Requirement already satisfied: django-jquery-js in /Users/homepc/opt/anaconda3/lib/python3.8/site-packages (from django-formset-js) (3.1.1)
Requirement already satisfied: Django in /Users/homepc/.local/lib/python3.8/site-packages (from django-formset-js) (2.2)
Requirement already satisfied: sqlparse in /Users/homepc/opt/anaconda3/lib/python3.8/site-packages (from Django->django-formset-js) (0.4.1)
Requirement already satisfied: pytz in /Users/homepc/opt/anaconda3/lib/python3.8/site-packages (from Django->django-formset-js) (2020.1)
请问我的设置中遗漏了什么吗?