diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-02 12:51:26 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-02 12:51:26 +0200 |
commit | 528e51fc17ca9e90f0b3fa013f50cf985e77978f (patch) | |
tree | 30daf08e6a98b4fd84a8269881e7f9195b62da56 /example_project/settings.py | |
parent | a57d1767d7f287457f5d03db0061889319695f59 (diff) | |
download | Ishtar-528e51fc17ca9e90f0b3fa013f50cf985e77978f.tar.bz2 Ishtar-528e51fc17ca9e90f0b3fa013f50cf985e77978f.zip |
settings: add parameter for a debug to console env
Diffstat (limited to 'example_project/settings.py')
-rw-r--r-- | example_project/settings.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/example_project/settings.py b/example_project/settings.py index dceeff0be..778a16610 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -7,6 +7,7 @@ import sys DEBUG = False DEBUG_TOOLBAR = False +DEBUG_TO_CONSOLE = False TEMPLATE_DEBUG = DEBUG SQL_DEBUG = False DJANGO_EXTENSIONS = False @@ -261,7 +262,10 @@ JQUERY_UI_URL = STATIC_URL + "js/jquery-ui/" if DEBUG: # make all loggers use the console for logger in LOGGING['loggers']: - LOGGING['loggers'][logger]['handlers'] += ['console'] + if DEBUG_TO_CONSOLE: + LOGGING['loggers'][logger]['handlers'] = ['console'] + elif 'console' not in LOGGING['loggers'][logger]['handlers']: + LOGGING['loggers'][logger]['handlers'] += ['console'] if DJANGO_EXTENSIONS: INSTALLED_APPS.append('django_extensions') |