From 5c3d1ec163ecbb6209965d1ea32fe4d380dcc9c6 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 25 Oct 2005 01:51:57 +0000 Subject: [PATCH] Fixed #677 -- db.queries is now reset per request. Thanks, seancazzell git-svn-id: http://code.djangoproject.com/svn/django/trunk@1009 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/handlers/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py index 9b541b36db..190a8b02c2 100644 --- a/django/core/handlers/base.py +++ b/django/core/handlers/base.py @@ -48,6 +48,9 @@ class BaseHandler: from django.core.mail import mail_admins from django.conf.settings import DEBUG, INTERNAL_IPS, ROOT_URLCONF + # Reset query list per request. + db.db.queries = [] + # Apply request middleware for middleware_method in self._request_middleware: response = middleware_method(request)