From a52bb7b8c4a575faf2b3eda12dcee6e5c44a9b35 Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Tue, 22 Dec 2020 18:52:25 +0100 Subject: [PATCH] create local_settings.py in local test --- conf/ynh_for_runners_settings.py | 2 +- local_test.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/ynh_for_runners_settings.py b/conf/ynh_for_runners_settings.py index e6330db..9eacb76 100644 --- a/conf/ynh_for_runners_settings.py +++ b/conf/ynh_for_runners_settings.py @@ -185,6 +185,6 @@ LOGGING = { # ----------------------------------------------------------------------------- try: - from .local_settings import * # noqa + from local_settings import * # noqa except ImportError: pass diff --git a/local_test.py b/local_test.py index 9a3afd2..063b42e 100755 --- a/local_test.py +++ b/local_test.py @@ -130,6 +130,10 @@ def main(): # conf/ynh_urls.py -> local_test/ynh_urls.py copy_patch(src_file=URLS_FILE, replaces=REPLACES) + with Path(FINAL_HOME_PATH / 'local_settings.py').open('w') as f: + f.write('# Only for local test run\n') + f.write('SERVE_FILES=True # used in src/for_runners_project/urls.py\n') + # call "local_test/manage.py" via subprocess: call_manage_py('check --deploy') call_manage_py('migrate --no-input')