我有一个settings.py文件,它包含基本设置。然后我有一个local_settings.py文件,其中包含一些分析和测试应用程序,如django_debug_toolbar等,然后我有一个不同的production_settings.py文件,其中包含数据库设置等生产。django不同的production_settings文件
我已将local_settings.py文件添加到我的.gitignore,以便它不会被推送到生产。而在我的settings.py文件,我已经把下列 -
try:
from local_settings import *
INSTALLED_APPS += LS_APPS
MIDDLEWARE_CLASSES += LS_MIDDLEWARE_CLASSES
except ImportError:
try:
from production_settings import *
INSTALLED_APPS += PROD_APPS
except:
pass
我在Heroku上运行的东西。问题在于production_settings中的设置没有反映在生产服务器上,出了什么问题? 请帮忙,谢谢!