diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2014-11-08 23:41:18 +0200 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2014-11-08 23:41:18 +0200 |
commit | 58d8e47d2f7cd88a57c907626d69ebee4d1e0e30 (patch) | |
tree | 4f860de6f1b63d34c541debc61ce8012908d16c2 | |
parent | 6e20f9c259356528acd44c4f1e79769c328309aa (diff) | |
download | linaro-license-protection-58d8e47d2f7cd88a57c907626d69ebee4d1e0e30.tar.gz |
manage.sh: Add helper script to call manage.py with correct env.2014.10
Change-Id: I27a74199d5b34c697c64b06c88b58e76f12cf09a
-rw-r--r-- | manage.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/manage.sh b/manage.sh new file mode 100644 index 0000000..49f4550 --- /dev/null +++ b/manage.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# This script is example/reminder how to run manage.py on production +# installs which have site django config well outside the main codebase. +# +# If this looks complicated, that's because it is. +# + +if [ -z "$DJANGO_SETTINGS_MODULE" ]; then + echo "DJANGO_SETTINGS_MODULE envvar should be set" + echo "e.g.: DJANGO_SETTINGS_MODULE=settings_staging_snapshots" + echo "Available configs:" + ls -1 ../configs/django/ + exit 1 +fi + +cd .. +PYTHONPATH=configs/django/:linaro-license-protection:. django-admin "$@" |