Django-debug-toolbar: SQL queries are shown escaped and query details are no longer accessible with version 1.4

Created on 17 Nov 2015  路  7Comments  路  Source: jazzband/django-debug-toolbar

With Django 1.8.6 and the default sqlite database, in the SQL section the queries are displayed escaped into their HTML code, which makes them very hard to read. Also, when clicking on the little expand toggle button, it does not give the line of code which generated the query as it used to. Interestingly, AJAX requests seen using the chromium extension are displayed as they should.
This seems to be a regression as everything works fine with version 1.3.2.
Thanks !

Bug

All 7 comments

I am using Django 1.9 and django-debug-toolbar 1.4, I am getting this error too. I just had a quick look and it looks like it is with sql.utils.BoldKeywordFilter, if I disable this then I can read sql.
Just wan to share this, if this helps
Thanks

@dilrajsachdev How did you disable BoldKeywordFilter?

edit: Okay so its in debug_toolbar/panels/sql/utils.py....I'd rather not touch the library though so hopefully this can actually be fixed

I experienced this behavior when using Debug Toolbar together with Django Debug Panel 0.8.2 for debugging AJAX requests.

Removing DebugPanelMiddleware from middlewares and reverting back to the original DebugToolbarMiddleware seems to resolve the issue in my case. Naturally, Debug Panel won't be usable until the issue is fixed.

If this is the case with you as well, maybe the issue lies with Debug Panel's overrides and not here with Debug Toolbar. Although, adjustments for DT 1.4 has been made so I can't confirm the cause for this.

HTH

I've basically confirmed that its been narrowed down to BoldKeywordFilter as previously determined. However I don't have enough time to actually try to fix this.

I confirm that bug with Django 1.8.4. Using DebugToolbarMiddleware instead of DebugPanelMiddleware fixed the problem.

@muratcorlu, thanks! Changing the middleware fixed it for me as well.

I gather from the discussion that the bug only appears when Django Debug Panel is in use, and that's a third party project.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gw0 picture gw0  路  3Comments

FlipperPA picture FlipperPA  路  6Comments

lfigueira picture lfigueira  路  10Comments

JoshBradshaw picture JoshBradshaw  路  6Comments

pawamoy picture pawamoy  路  5Comments