Skip to content

Commit

Permalink
allow env to toggle django debug to true/false using 'yes' or 'no'
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-johnson committed Aug 2, 2018
1 parent f934cfd commit de1c625
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ script:
- python manage.py test

after_success:
- export USE_VERSION=1.3.6
- export USE_VERSION=1.3.7
- echo "Building Docker images with tag=${USE_VERSION}"
- echo "Test Success - Branch=${TRAVIS_BRANCH} Version=${USE_VERSION} Pull Request=${TRAVIS_PULL_REQUEST} Tag=${TRAVIS_TAG}"
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then echo -e "Push Container to Docker Hub"; fi
Expand Down
8 changes: 7 additions & 1 deletion webapp/drf_network_pipeline/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,13 @@ class Development(Common):
"""
The in-development settings and the default configuration.
"""
DEBUG = True
DEBUG = bool(os.getenv(
'DJANGO_DEBUG',
'yes') == 'yes')

TEMPLATE_DEBUG = bool(os.getenv(
'DJANGO_TEMPLATE_DEBUG',
'yes') == 'yes')

ALLOWED_HOSTS = [
"localhost",
Expand Down

0 comments on commit de1c625

Please sign in to comment.