Skip to content

Commit

Permalink
Add django debug toolbar to the sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
mvantellingen committed May 31, 2017
1 parent f2aa887 commit 59b6e7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions sandbox/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Django>=1.11,<1.12
wagtail>=1.10,<1.11
django-debug-toolbar==1.8
-e .[docs,test]
5 changes: 5 additions & 0 deletions sandbox/sandbox/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

'modelcluster',
'taggit',
'debug_toolbar',

'django.contrib.admin',
'django.contrib.auth',
Expand All @@ -65,6 +66,7 @@
]

MIDDLEWARE = [
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
Expand Down Expand Up @@ -154,3 +156,6 @@
# Base URL to use when referring to full URLs within the Wagtail admin backend -
# e.g. in notification emails. Don't include '/admin' or a trailing slash
BASE_URL = 'http://example.com'


INTERNAL_IPS = ['127.0.0.1']
5 changes: 5 additions & 0 deletions sandbox/sandbox/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import absolute_import, unicode_literals

import debug_toolbar
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
Expand Down Expand Up @@ -35,3 +36,7 @@
# Serve static and media files from development server
urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns

0 comments on commit 59b6e7f

Please sign in to comment.