Show debug toolbar to all incoming requests

This commit is contained in:
Rodolfo Carvalho 2015-05-24 13:37:30 +02:00
parent fe41f577cd
commit 5bc5c9d9bc
1 changed files with 12 additions and 0 deletions

View File

@ -120,3 +120,15 @@ USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
# Django Debug Toolbar settings
DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': 'project.settings.show_debug_toolbar',
}
def show_debug_toolbar(request):
if request.is_ajax():
return False
return bool(DEBUG)