diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-03-31 12:18:50 +0000 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-03-31 12:18:50 +0000 |
| commit | 3f1650680916b06df630bb4a5906c41a079ca42b (patch) | |
| tree | f20dc2616bd104324fd6cc89f5922a27dec2ffb0 | |
| parent | d66035c4a6629fd68a373448bf95b7818c0d72a2 (diff) | |
Removed deprecated attribute Response.template in the test client. Refs #12226.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/test/client.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/django/test/client.py b/django/test/client.py index 6f3b73dde3..2b26335037 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -3,7 +3,6 @@ import sys import os import re import mimetypes -import warnings from copy import copy from urlparse import urlparse, urlsplit try: @@ -412,17 +411,6 @@ class Client(RequestFactory): if response.context and len(response.context) == 1: response.context = response.context[0] - # 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)", - DeprecationWarning, stacklevel=2) - if not self.templates: - return None - elif len(self.templates) == 1: - return self.templates[0] - return self.templates - response.__class__.template = property(_get_template) - # Update persistent cookie data. if response.cookies: self.cookies.update(response.cookies) |
