Commit a4984317 authored by Skia's avatar Skia

Add Django debug toolbar

parent aa932110
......@@ -11,5 +11,6 @@ django-ajax-selects
reportlab
django-haystack
whoosh
django-debug-toolbar
# mysqlclient
......@@ -481,3 +481,8 @@ try:
print("Custom settings imported")
except:
print("Custom settings failed")
if DEBUG:
INTERNAL_IPS = ['127.0.0.1']
INSTALLED_APPS += ("debug_toolbar",)
MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES
......@@ -49,4 +49,8 @@ urlpatterns = [
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
import debug_toolbar
urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls)),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment