diff options
| author | Rob Hudson | 2009-09-12 16:42:59 -0700 |
|---|---|---|
| committer | Rob Hudson | 2009-09-12 16:42:59 -0700 |
| commit | b7d7e9f876b67be35d8a24405f6940b2dcb66e97 (patch) | |
| tree | 572393460d9a6c4913ba2fcaeac94361e319746f /debug_toolbar/panels/sql.py | |
| parent | 05ecb07d22be34651d60e2e1683c5ab96219d5fd (diff) | |
| download | django-debug-toolbar-b7d7e9f876b67be35d8a24405f6940b2dcb66e97.tar.bz2 | |
Fixed to only show the link for requesting the SELECT data if the query is a
SELECT query.
Diffstat (limited to 'debug_toolbar/panels/sql.py')
| -rw-r--r-- | debug_toolbar/panels/sql.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_toolbar/panels/sql.py b/debug_toolbar/panels/sql.py index 17f4598..17130ca 100644 --- a/debug_toolbar/panels/sql.py +++ b/debug_toolbar/panels/sql.py @@ -106,7 +106,8 @@ class DatabaseStatTracker(util.CursorDebugWrapper): 'stacktrace': stacktrace, 'start_time': start, 'stop_time': stop, - 'is_slow': (duration > SQL_WARNING_THRESHOLD) + 'is_slow': (duration > SQL_WARNING_THRESHOLD), + 'is_select': sql.lower().strip().startswith('select'), }) util.CursorDebugWrapper = DatabaseStatTracker |
