mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
Add Django debug toolbar
This commit is contained in:
parent
aa93211025
commit
a4984317e9
@ -11,5 +11,6 @@ django-ajax-selects
|
|||||||
reportlab
|
reportlab
|
||||||
django-haystack
|
django-haystack
|
||||||
whoosh
|
whoosh
|
||||||
|
django-debug-toolbar
|
||||||
# mysqlclient
|
# mysqlclient
|
||||||
|
|
||||||
|
@ -481,3 +481,8 @@ try:
|
|||||||
print("Custom settings imported")
|
print("Custom settings imported")
|
||||||
except:
|
except:
|
||||||
print("Custom settings failed")
|
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:
|
if settings.DEBUG:
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||||
|
import debug_toolbar
|
||||||
|
urlpatterns += [
|
||||||
|
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||||
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user