settings.pyファイルを削除settingsし、同じレベルにディレクトリを作成して、3 つのファイルを作成しました。これらのファイルは次のとおりです。
settings/production.pysettings/staging.pysettings/__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))。何か不足していますか?ありがとう