Get debug toolbar with ajax calls

- Add django-debug-panel module to pip development dependencies
- Enable debug toolbar on ajax calls by using the "Django Debug Panel"
  extension for... Chrome.

For further informations about:
- django module, see https://github.com/recamshak/django-debug-panel
- Chrome extension, see https://github.com/recamshak/chrome-django-panel
This commit is contained in:
Aurélien Delobelle 2017-04-06 14:36:25 +02:00
parent 1302adf156
commit c9019c4eb4
2 changed files with 3 additions and 3 deletions

View file

@ -42,6 +42,7 @@ INSTALLED_APPS = (
'captcha',
'django_cas_ng',
'debug_toolbar',
'debug_panel',
'bootstrapform',
'kfet',
'channels',
@ -50,7 +51,7 @@ INSTALLED_APPS = (
)
MIDDLEWARE_CLASSES = (
'debug_toolbar.middleware.DebugToolbarMiddleware',
'debug_panel.middleware.DebugPanelMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@ -189,8 +190,6 @@ def show_toolbar(request):
"""
if not DEBUG:
return False
if request.is_ajax():
return False
return True
DEBUG_TOOLBAR_CONFIG = {

View file

@ -1,3 +1,4 @@
-r requirements.txt
django-debug-toolbar
django-debug-panel
ipython