settings.py
ファイルを削除settings
し、同じレベルにディレクトリを作成して、3 つのファイルを作成しました。これらのファイルは次のとおりです。
settings/production.py
settings/staging.py
settings/__init__.py
init
次のステートメントをファイルに入れます。
site_env = get_env_variable('SITE_ENV')
if site_env:
if site_env == 'staging':
from .staging import *
elif site_env == 'production':
from .production import *
しかし、エラーが発生していますraise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
。何か不足していますか?ありがとう