diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2010-11-11 15:04:37 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2010-11-11 15:04:37 +0000 |
| commit | 7beca4d3e5da784297ff7163d00dcfeee9a34dd6 (patch) | |
| tree | 04815aecbea6d426e93bb07e50f459cad4b9d132 | |
| parent | b0590110c78a9490c2a633b225f08e009f7f8ee8 (diff) | |
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
| -rw-r--r-- | django/test/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/test/client.py b/django/test/client.py index 4f09726900..67866e9bab 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: |
