diff options
Diffstat (limited to 'example_project/settings.py')
| -rw-r--r-- | example_project/settings.py | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/example_project/settings.py b/example_project/settings.py index bb7a59d74..0aaeb306d 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -4,6 +4,8 @@  import os +SQL_DEBUG = False +  ROOT_PATH = os.path.abspath(os.path.curdir) + os.path.sep  STATIC_URL = '/static/'  STATIC_ROOT = ROOT_PATH + 'static/' @@ -125,6 +127,10 @@ LOGGING = {'version': 1,              'class': 'logging.handlers.WatchedFileHandler',              'filename': '/var/log/django/ishtar.log'          }, +         'console':{ +             'level': 'DEBUG', +             'class': 'logging.StreamHandler', +        },      },      'loggers': {          # Again, default Django configuration to email unhandled exceptions @@ -197,3 +203,9 @@ import sys  if 'test' in sys.argv or 'test_coverage' in sys.argv:      DATABASES['default']['engine'] = 'sqlite3' + +if SQL_DEBUG: +    LOGGING['loggers']['django.db.backends'] = { +            'level': 'DEBUG', +            'handlers': ['console'], +        } | 
