changeset 36:7236f526e414

Remove unused sqllog.py middleware.
author Brian Neal <bgneal@gmail.com>
date Wed, 30 Nov 2011 00:16:44 +0000 (2011-11-30)
parents 21172e9be136
children c1f3658830e0
files mysite/sqllog.py
diffstat 1 files changed, 0 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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('''
-            <p><em>Total query count:</em> {{ count }}<br/>
-            <em>Total execution time:</em> {{ time }}</p>
-            <ol class="sqllog">
-                {% for sql in sqllog %}
-                    <li>{{ sql.time }}: {{ sql.sql }}</li>
-                {% endfor %}
-            </ol>
-         ''')
-         response.content = "%s%s" % ( response.content, t.render(Context({'sqllog':connection.queries,'count':len(connection.queries),'time':time})))
-         return response