Commits

Luke Plant  committed 2b621eb

Added django debug toolbar for development

  • Participants
  • Parent commits 2bc4a80

Comments (0)

Files changed (1)

File christchurch/settings.py

     'django.template.loaders.app_directories.Loader',
 )
 
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE_CLASSES = [
     'django.middleware.transaction.TransactionMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'cms.middleware.user.CurrentUserMiddleware',
     'cms.middleware.toolbar.ToolbarMiddleware',
     'cms.middleware.media.PlaceholderMediaMiddleware',
-)
+]
 
-TEMPLATE_CONTEXT_PROCESSORS = (
+TEMPLATE_CONTEXT_PROCESSORS = [
     'django.core.context_processors.auth',
     'django.core.context_processors.i18n',
     'django.core.context_processors.request',
     'django.core.context_processors.static',
     'cms.context_processors.media',
     'christchurch.processors.common',
-)
+]
 
 ROOT_URLCONF = 'christchurch.urls'
 
-INSTALLED_APPS = (
+INSTALLED_APPS = [
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'cms.plugins.snippet',
     'cms.plugins.googlemap',
     'semanticeditor',
-)
+]
 
 CMS_TEMPLATES = (
     ('standard.html', 'Standard Template'),
 
 
 SEMANTICEDITOR_MEDIA_URL = os.path.join(STATIC_URL, "semanticeditor/")
+
+
+if DEBUG:
+    TEMPLATE_CONTEXT_PROCESSORS.append("django.core.context_processors.debug")
+    DEBUG_TOOLBAR_CONFIG = {
+        'INTERCEPT_REDIRECTS': False,
+    }
+    MIDDLEWARE_CLASSES.append("debug_toolbar.middleware.DebugToolbarMiddleware")
+
+    INTERNAL_IPS = ('127.0.0.1',)
+    INSTALLED_APPS.append("debug_toolbar")