我是一个完全的Heroku新手,正在尝试在Heroku上设置Django应用程序。 我无法弄清楚在settings.py中为这些设置输入什么:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': '',
'PASSWORD': '',
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '', # Set to empty string for default.
}
}
有人能帮我吗?谢谢!
import
仅覆盖特定的设置。解释如何做这件事有点复杂,但我相信如果您正在寻找类似资源,对于初学者来说非常有用的书籍“Django两球冰淇淋”中详细介绍了这种策略。 - Andrew Gorcester