aboutsummaryrefslogtreecommitdiff
path: root/manage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'manage.sh')
-rw-r--r--manage.sh18
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 "$@"