Generally working version.
[wolnelektury.git] / src / catalogue / utils.py
index bcc5a0b..71cd890 100644 (file)
@@ -342,17 +342,5 @@ class AppSettings(object):
         return value
 
 
-def trim_query_log(trim_to=25):
-    """
-connection.queries includes all SQL statements -- INSERTs, UPDATES, SELECTs, etc. Each time your app hits the database, the query will be recorded.
-This can sometimes occupy lots of memory, so trim it here a bit.
-    """
-    if settings.DEBUG:
-        from django.db import connection
-        connection.queries = trim_to > 0 \
-            and connection.queries[-trim_to:] \
-            or []
-
-
 def delete_from_cache_by_language(cache, key_template):
     cache.delete_many([key_template % lc for lc, ln in settings.LANGUAGES])