Skip to content

Commit 94b2ab4

Browse files
author
Kenneth Reitz
committed
disable injection for new applications
1 parent a21dbc2 commit 94b2ab4

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • bin/steps/django

bin/steps/django/init

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/usr/bin/env bash
22

3-
SETTINGS_FILE=$(find . -maxdepth 2 -type f -name 'settings.py' | head -1)
3+
SETTINGS_FILE=$(find . -maxdepth 3 -type f -name 'settings.py' | head -1)
44
PROJECT=$(dirname $SETTINGS_FILE)
55

6-
export SETTINGS_FILE PROJECT
6+
# Disable injection for new applications.
7+
if [ ! -f .heroku/injection_disabled ]; then
8+
DISABLE_INJECTION=1
9+
fi
10+
11+
export SETTINGS_FILE PROJECT DISABLE_INJECTION
712

813
if [ ! "$DISABLE_INJECTION" ]; then
914
source injection
1015
fi
1116

12-
1317
source collectstatic

0 commit comments

Comments
 (0)