X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..274de65ca44c680c6c555c599ec32428c79db356:/src/catalogue/utils.py diff --git a/src/catalogue/utils.py b/src/catalogue/utils.py index bcc5a0b33..71cd8907a 100644 --- a/src/catalogue/utils.py +++ b/src/catalogue/utils.py @@ -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])