X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/bb68c8efe90a6f818c2c26f36ef0e02c91ed6158..5ab359e2dd53758c27bdb42cc4013cdea15966ae:/wolnelektury/settings.py?ds=sidebyside diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index 294869355..8fac3833a 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -68,23 +68,17 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.request', ) -MIDDLEWARE_CLASSES = ( +MIDDLEWARE_CLASSES = [ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', - 'debug_toolbar.middleware.DebugToolbarMiddleware', 'pagination.middleware.PaginationMiddleware', -) - -DEBUG_TOOLBAR_PANELS = ( - 'debug_toolbar.panels.version.VersionDebugPanel', - 'debug_toolbar.panels.sql.SQLDebugPanel', - 'debug_toolbar.panels.timer.TimerDebugPanel', - 'debug_toolbar.panels.headers.HeaderDebugPanel', -) +] -INTERNAL_IPS = ('127.0.0.1', ) +# If DEBUG is enabled add query log to bottom of every template +if DEBUG: + MIDDLEWARE_CLASSES.append('middleware.ProfileMiddleware') ROOT_URLCONF = 'urls' @@ -102,8 +96,8 @@ COMPRESS_CSS = { COMPRESS_JS = { 'all': { - 'source_filenames': ('js/jquery.js', 'js/jquery.autocolumn.js', 'js/jquery.autocomplete.js', - 'js/jquery.form.js', 'js/jquery.jqmodal.js', 'js/jquery.labelify.js', 'js/catalogue.js',), + 'source_filenames': ('js/jquery.js', 'js/jquery.autocomplete.js', 'js/jquery.form.js', + 'js/jquery.jqmodal.js', 'js/jquery.labelify.js', 'js/catalogue.js',), 'output_filename': 'js/all.min.js', } } @@ -124,7 +118,6 @@ INSTALLED_APPS = ( 'pagination', 'chunks', 'compress', - 'debug_toolbar', 'catalogue', )