create local_settings.py in local test

This commit is contained in:
JensDiemer 2020-12-22 18:52:25 +01:00
parent 17b45f8310
commit a52bb7b8c4
2 changed files with 5 additions and 1 deletions

View file

@ -185,6 +185,6 @@ LOGGING = {
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
try: try:
from .local_settings import * # noqa from local_settings import * # noqa
except ImportError: except ImportError:
pass pass

View file

@ -130,6 +130,10 @@ def main():
# conf/ynh_urls.py -> local_test/ynh_urls.py # conf/ynh_urls.py -> local_test/ynh_urls.py
copy_patch(src_file=URLS_FILE, replaces=REPLACES) 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 "local_test/manage.py" via subprocess:
call_manage_py('check --deploy') call_manage_py('check --deploy')
call_manage_py('migrate --no-input') call_manage_py('migrate --no-input')