diff options
| author | Rob Hudson | 2009-08-28 09:21:39 -0700 |
|---|---|---|
| committer | Rob Hudson | 2009-08-28 09:21:39 -0700 |
| commit | f97ff555a4d8f22dae83bcfd0c2dcf6e846962c9 (patch) | |
| tree | 668ce76df028ebf37de98e48a022e7bbdb844151 /debug_toolbar/views.py | |
| parent | 4a59813e75d7cb3b88bf2b223b21d4e23d9ecb03 (diff) | |
| download | django-debug-toolbar-f97ff555a4d8f22dae83bcfd0c2dcf6e846962c9.tar.bz2 | |
Refactored SQL panel to use datetime objects and added a visual display of both duration and sequence to the SQL template.
Diffstat (limited to 'debug_toolbar/views.py')
| -rw-r--r-- | debug_toolbar/views.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/debug_toolbar/views.py b/debug_toolbar/views.py index 255a49c..3a8cb79 100644 --- a/debug_toolbar/views.py +++ b/debug_toolbar/views.py @@ -33,7 +33,7 @@ def sql_select(request): Expected GET variables: sql: urlencoded sql with positional arguments params: JSON encoded parameter values - time: time for SQL to execute passed in from toolbar just for redisplay + duration: time for SQL to execute passed in from toolbar just for redisplay hash: the hash of (secret + sql + params) for tamper checking """ from debug_toolbar.panels.sql import reformat_sql @@ -52,7 +52,7 @@ def sql_select(request): context = { 'result': result, 'sql': reformat_sql(cursor.db.ops.last_executed_query(cursor, sql, params)), - 'time': request.GET.get('time', 0.0), + 'duration': request.GET.get('duration', 0.0), 'headers': headers, } return render_to_response('debug_toolbar/panels/sql_select.html', context) @@ -65,7 +65,7 @@ def sql_explain(request): Expected GET variables: sql: urlencoded sql with positional arguments params: JSON encoded parameter values - time: time for SQL to execute passed in from toolbar just for redisplay + duration: time for SQL to execute passed in from toolbar just for redisplay hash: the hash of (secret + sql + params) for tamper checking """ from debug_toolbar.panels.sql import reformat_sql @@ -84,7 +84,7 @@ def sql_explain(request): context = { 'result': result, 'sql': reformat_sql(cursor.db.ops.last_executed_query(cursor, sql, params)), - 'time': request.GET.get('time', 0.0), + 'duration': request.GET.get('duration', 0.0), 'headers': headers, } return render_to_response('debug_toolbar/panels/sql_explain.html', context) @@ -97,7 +97,7 @@ def sql_profile(request): Expected GET variables: sql: urlencoded sql with positional arguments params: JSON encoded parameter values - time: time for SQL to execute passed in from toolbar just for redisplay + duration: time for SQL to execute passed in from toolbar just for redisplay hash: the hash of (secret + sql + params) for tamper checking """ from debug_toolbar.panels.sql import reformat_sql @@ -127,7 +127,7 @@ def sql_profile(request): 'result': result, 'result_error': result_error, 'sql': reformat_sql(cursor.db.ops.last_executed_query(cursor, sql, params)), - 'time': request.GET.get('time', 0.0), + 'duration': request.GET.get('duration', 0.0), 'headers': headers, } return render_to_response('debug_toolbar/panels/sql_profile.html', context) |
