aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/sql.py
AgeCommit message (Collapse)Author
2011-06-15Provide the class name explicitly to super() to prevent infinite loops when ↵Brandon Konkle
SQLDebugPanel is subclassed.
2011-04-08Updated sql panel to include logging support.Rob Hudson
This matches Django's added logging support to the debug cursor.
2011-04-06Added basic support for multi-db.Rob Hudson
Thanks to David Cramer, Ionel Cristian Mărieș, noah256, and Sander Steffann, who all supplied patches.
2011-01-09Added support for executemany. Fixes issue #120postal2600
Signed-off-by: Rob Hudson <rob@cogit8.org>
2010-12-08Added clean_params method to DatabaseStatTracker to scrub non-unicodeMatthew J Morrison
data for displaying on the sql panel Signed-off-by: Rob Hudson <rob@cogit8.org>
2010-01-22Escape invalid html in SQL queries.Gabriel
For example, a query containing a stray ampersand needs to be escaped. Signed-off-by: Rob Hudson <rob@cogit8.org>
2010-01-14Template panel context cleanup.Chris Adams
All panels get a copy of the template context when created and use an updated copy when rendering so they can have full access to context vars and avoid making changes to the shared context. Signed-off-by: Rob Hudson <rob@cogit8.org>
2010-01-09Fix issue #33: ensure force_unicode doesn't convert non-strings.Daniel Roseman
2009-11-18Marked more strings for translation and updated 'fr' locale.David Jean Louis
Signed-off-by: Rob Hudson <rob@cogit8.org>
2009-11-06Fixed incompatability with Python 2.4.Rob Hudson
2009-11-02Show context where SQL query originated from templateChris Lamb
Signed-off-by: Chris Lamb <lamby@debian.org> Signed-off-by: Rob Hudson <rob@cogit8.org>
2009-09-22Added sqlparse, replacing my simple string replace SQL keywords and updatingRob Hudson
management command and SQL panel.
2009-09-12Merge remote branch 'alex/master'Rob Hudson
2009-09-12Fixed to only show the link for requesting the SELECT data if the query is aRob Hudson
SELECT query.
2009-09-11Added more SQL keywords.Rob Hudson
2009-09-10handle merge conflictsAlex Gaynor
2009-09-08Fixed an issue where the panel navigation might have a different number ofRob Hudson
queries than the panel pane if SQL queries happened in between calls. This caches the queries off in an array to be used in both places. If the possibility of queries happening elsewhere occurs, the SQL panel should probably be moved lower in the execution stack.
2009-08-28Refactored `reformat_sql` to produce a more compact output for a tighter ↵Rob Hudson
view of the SQL.
2009-08-28Refactored SQL panel to use datetime objects and added a visual display of ↵Rob Hudson
both duration and sequence to the SQL template.
2009-08-12added in-panel titleIdan Gazit
2009-08-12renamed title/subtitle -> nav_title/nav_subtitleIdan Gazit
2009-08-11Refactored the UI to be a right hand side vertical toolbar. DebugPanel ↵Rob Hudson
subclass grew a subtitle method to display informative text under the title.
2009-06-16provide an option to see stuff indjango in the sql stack traceAlex Gaynor
2009-05-27Adding a signals panel to display list of signals and their providing argumentsAlex Gaynor
and receivers. Thanks Alex Gaynor! Signed-off-by: Rob Hudson <rob@cogit8.org>
2009-03-21Merge commit 'rob/master'Alex Gaynor
2009-03-21Adding stack traces to SQL panel to see where the calls are coming from.Rob Hudson
Merge branch 'sql_stacktrace' * sql_stacktrace: Tuple unpacking of stacktrace variables for niceness. Add preliminary support for stacktraces to see where SQL queries are coming from.
2009-03-21resoled merge conflictsAlex Gaynor
2009-03-21Tidied up SQL formatting in SQL panel.Malcolm Tredinnick
Added formatting of "GROUP BY" and "HAVING", which now show up in trunk queries and could have shown up previously if manually patched into the QuerySet.query instance. Also indent joined tables a bit more underneath the "FROM" statement: they are sub-statements of "FROM". Signed-off-by: Rob Hudson <rob@cogit8.org>
2009-03-21Fixed "FROM" formatting in SQL panel layout.Malcolm Tredinnick
We always start a new line for "FROM" now. Previous code was assuming MySQL quoting of identifiers (MySQL is a bit non-standard in using backquotes) and was assuming the last thing before the FROM would be a quoted identifier, which wasn't always true, particularly when extra() is used on querysets. Signed-off-by: Rob Hudson <rob@cogit8.org>
2009-01-23Add preliminary support for stacktraces to see where SQL queries are coming ↵Rob Hudson
from. I'm wanting to test this a bit more before I merge it in fully. Feedback welcome.
2008-12-09Fix the number of queries shown in the title, which was overreporting by ↵Adam Gomaa
self._offset (sometimes 0).
2008-12-09Only show the SQL profile if we're using a MySQL database backend.Rob Hudson
2008-12-09Django seems to only produce LEFT OUTER JOINs, so search for that.Rob Hudson
2008-10-07Fix inconsistent SQL timings. All SQL timings are milliseconds now.Rob Hudson
2008-10-07Since we're concatenating params, make the default empty value a string.Rob Hudson
2008-10-07Bringing over patch from Alex Gaynor to fix SQL params when using ↵Rob Hudson
django.contrib.gis.
2008-10-06Updating SQL output a bit now that I've found more queries to test against.Rob Hudson
2008-10-05better fixAlex Gaynor
2008-10-05fix for gis I thinkAlex Gaynor
2008-10-04changed stuff about the sql formatter, it still looks weird, not sure whyAlex Gaynor
2008-09-24Adding a SHA-1 hash to the parameters passed to get the EXPLAIN query to avoidRob Hudson
any sort of tampering of the SQL or parameters.
2008-09-23Add catch for non JSON serializable objects and don't show the EXPLAIN link forRob Hudson
these.
2008-09-23Updating pygments styles to better match new toolbar styles.Rob Hudson
2008-09-21Refactoring middleware and panels so panels have more explicit middleware-likeRob Hudson
methods to be more clear when panel processing happens.
2008-09-21Show 1 SQL query v.s. 3 SQL queriesSimon Willison
2008-09-20Updating SQL panel to use Pygments for SQL highlighting if it's available,Rob Hudson
moving the EXPLAIN link to the left to avoid scrolling. I have a feeling that the SQL panel could use a serious security review since we're passing SQL in via GET which is, I'm sure, a big no-no.
2008-09-20Import simplejson from django rather than an external dependency.Rob Hudson
2008-09-11Adding JSON params to pass to view and adding link for explain.Rob Hudson
2008-09-11Moving reformat sql so we can pull this in elsewhere.Rob Hudson
2008-09-09Making it so that the SQL panel display SQL a little more formatted and nice.Rob Hudson