使用heroku应用所有迁移后,运行python manage.py migrate。 它给出了这个错误。 我换成了postgresql。但迁移仍然只应用于sqlite3
OperationalError at /
no such table: shastri_occasion
Request Method: GET
Request URL: https://bdsharma.herokuapp.com/
Django Version: 3.1.1
Exception Type: OperationalError
Exception Value:
no such table: shastri_occasion
Exception Location: /app/.heroku/python/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py, line 413, in execute
Python Executable: /app/.heroku/python/bin/python
Python Version: 3.6.12
Python Path:
['/app/.heroku/python/bin',
'/app',
'/app/.heroku/python/lib/python36.zip',
'/app/.heroku/python/lib/python3.6',
'/app/.heroku/python/lib/python3.6/lib-dynload',
'/app/.heroku/python/lib/python3.6/site-packages']
Server time: Fri, 11 Sep 2020 09:34:29 +0000
我换成了postgresql。但迁移仍然只应用于sqlite3。 这是my setting.py数据库设置:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'ddbp7me1o4bf',
'USER' :'iwdvmaevgph',
'PASSWORD' : '****************************8',
'HOST' : '*****************8',
'PORT' : '5432',
}
}
您可以这样配置数据库设置
相关问题 更多 >
编程相关推荐