aboutsummaryrefslogtreecommitdiff
path: root/manage.sh
blob: 49f455046bb693125d2db785c265ea325117da61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 "$@"