From 2e32edc3b968318ede2e05c14802a29dc9120485 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Fri, 15 Sep 2017 10:44:45 +0200 Subject: [PATCH] add DJANGO_SETTINGS_MODULE --- conf/cron_weblate | 6 +++--- scripts/install | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/conf/cron_weblate b/conf/cron_weblate index b0627ab..0e43728 100644 --- a/conf/cron_weblate +++ b/conf/cron_weblate @@ -1,9 +1,9 @@ # https://docs.weblate.org/en/latest/admin/install.html#production-cron # Fulltext index updates -10 * * * * www-data cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate update_index --settings weblate.settings +10 * * * * www-data cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate update_index # Cleanup stale objects -@daily cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate cleanuptrans --settings weblate.settings +@daily cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate cleanuptrans # Commit pending changes after 96 hours -@hourly cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate commit_pending --all --age=96 --verbosity=0 --settings weblate.settings +@hourly cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate commit_pending --all --age=96 --verbosity=0 diff --git a/scripts/install b/scripts/install index 922f2ed..c83918c 100755 --- a/scripts/install +++ b/scripts/install @@ -173,9 +173,10 @@ echo "SPECIFIC SETUP Filling up the database" ( set +eu source ${final_path}/venv/bin/activate - weblate migrate --noinput --settings weblate.settings + export DJANGO_SETTINGS_MODULE="weblate.settings" + weblate migrate --noinput # generate static files - weblate collectstatic --noinput --settings weblate.settings + weblate collectstatic --noinput ) #=================================================