summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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
commit52d4882f17fbb578c798f9529a88e495ae5a9ea3 (patch)
tree30daf08e6a98b4fd84a8269881e7f9195b62da56
parent69f30131e92c92f6e981b112d9fb65db3466aaa4 (diff)
downloadIshtar-52d4882f17fbb578c798f9529a88e495ae5a9ea3.tar.bz2
Ishtar-52d4882f17fbb578c798f9529a88e495ae5a9ea3.zip
settings: add parameter for a debug to console env
-rw-r--r--example_project/settings.py6
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')