Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #649 from cdosborn/simplify-vars-send-emails-and-d…
Browse files Browse the repository at this point in the history
…ebug

Simplify DEBUG and SEND_EMAILS variables
  • Loading branch information
cdosborn authored Aug 14, 2018
2 parents 8ee0b0b + d7acd71 commit 7d88104
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
### Changed
- Increased hard timeouts for tasks
([#650](https://github.com/cyverse/atmosphere/pull/650))
- Variable changes to DJANGO_DEBUG and SEND_EMAILS
([#649](https://github.com/cyverse/atmosphere/pull/649))

## [v33-0](https://github.com/cyverse/atmosphere/compare/v32-2...v33-0) - 2018-08-06
### Changed
Expand Down
14 changes: 11 additions & 3 deletions atmosphere/settings/local.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ SECRETS_MODULE = secrets

globals().update(vars(sys.modules['atmosphere.settings']))

# Debug Mode
DEBUG = {{ DJANGO_DEBUG | default(True) }}
SEND_EMAILS = {{ not DJANGO_DEBUG | default(False) }}
{% if DEBUG %}
DEBUG = True
{% else %}
DEBUG = False
{% endif %}

{% if SEND_EMAILS %}
SEND_EMAILS = True
{% else %}
SEND_EMAILS = False
{% endif %}

{% if DJANGO_TEMPLATE_DEBUG -%}
template_backends = filter(lambda t:
Expand Down
3 changes: 2 additions & 1 deletion variables.ini.dist
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ DATABASE_PASSWORD = atmosphere_db_pass # psql_password
DATABASE_HOST = localhost # remote.postgres-server.com
DATABASE_PORT = 5432
DATABASE_CONN_MAX_AGE = 60 # in seconds
DJANGO_DEBUG = True # Boolean required
DEBUG = True # Boolean required
DJANGO_DEBUG_TOOLBAR = False # Boolean required
ENFORCING = False # Boolean required #NOTE: DO NOT SET TO TRUE UNLESS YOU ARE PRODUCTION!
SSLSERVER = False # Boolean required
SEND_EMAILS = False # Boolean required
ENABLE_PROJECT_SHARING = True # Boolean required
ENABLE_IMAGE_VALIDATION = True # Boolean required
DJANGO_TEMPLATE_DEBUG = True # Boolean required
Expand Down

0 comments on commit 7d88104

Please sign in to comment.