-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL queries are shown escaped and query details are no longer accessible with version 1.4 #775
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. |
@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 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 |
@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. |
This should resolve jazzband/django-debug-toolbar#775. There's probably a cleaner solution. This just avoids calling generate_stats() multiple times for the SQL panel since it looks like the code escapes the raw SQL data in place. Only tested this against django-debug-toolbar 1.4 with django 1.8.11 - may require tweaks to run against different versions.
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 !
The text was updated successfully, but these errors were encountered: