Skip to content

Commit

Permalink
Review fixes + fixed missing docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
vi4m committed Aug 2, 2016
1 parent 8507c89 commit ac49fd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/ralph/settings/base.py
Expand Up @@ -7,6 +7,10 @@


def os_env_true(var, default=''):
"""Helper for converting env string into boolean.
Returns bool True for string values: '1' or 'true', or False otherwise.
"""
return os.environ.get(var, default).lower() in ('1', 'true')

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand Down
2 changes: 1 addition & 1 deletion src/ralph/settings/prod.py
Expand Up @@ -3,7 +3,7 @@

from ralph.settings import * # noqa

DEBUG = os.environ.get('RALPH_DEBUG', False)
DEBUG = os_env_true('RALPH_DEBUG', False)

STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' # noqa

Expand Down

0 comments on commit ac49fd1

Please sign in to comment.