Settings for debug/profile and use them in console plugin.
This commit is contained in:
16
bonobo/settings.py
Normal file
16
bonobo/settings.py
Normal file
@ -0,0 +1,16 @@
|
||||
import os
|
||||
|
||||
|
||||
def to_bool(s):
|
||||
if len(s):
|
||||
if s.lower() in ('f', 'false', 'n', 'no', '0'):
|
||||
return False
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# Debug mode.
|
||||
DEBUG = to_bool(os.environ.get('BONOBO_DEBUG', 'f'))
|
||||
|
||||
# Profile mode.
|
||||
PROFILE = to_bool(os.environ.get('BONOBO_PROFILE', 'f'))
|
||||
Reference in New Issue
Block a user