# HG changeset patch # User Brian Neal # Date 1322612204 0 # Node ID 7236f526e4146ed0a2e728f5af72baaaf866d817 # Parent 21172e9be136b1710a4c4cb98927b789162de77b Remove unused sqllog.py middleware. diff -r 21172e9be136 -r 7236f526e414 mysite/sqllog.py --- a/mysite/sqllog.py Wed Nov 30 00:11:23 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -from django.db import connection -from django.template import Template, Context - -class SQLLogMiddleware: - - def process_response ( self, request, response ): - time = 0.0 - for q in connection.queries: - time += float(q['time']) - t = Template(''' -

Total query count: {{ count }}
- Total execution time: {{ time }}

-
    - {% for sql in sqllog %} -
  1. {{ sql.time }}: {{ sql.sql }}
  2. - {% endfor %} -
- ''') - response.content = "%s%s" % ( response.content, t.render(Context({'sqllog':connection.queries,'count':len(connection.queries),'time':time}))) - return response