From 7beca4d3e5da784297ff7163d00dcfeee9a34dd6 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Thu, 11 Nov 2010 15:04:37 +0000 Subject: [PATCH] Made the deprecation warning for reponse.template more useful by pointing to the caller. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14525 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/test/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/test/client.py b/django/test/client.py index 4f097269007..67866e9babe 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -410,7 +410,7 @@ class Client(RequestFactory): # Provide a backwards-compatible (but pending deprecation) response.template def _get_template(self): warnings.warn("response.template is deprecated; use response.templates instead (which is always a list)", - PendingDeprecationWarning) + PendingDeprecationWarning, stacklevel=2) if not self.templates: return None elif len(self.templates) == 1: