Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed deprecated attribute Response.template in the test client. Re…

…fs #12226.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3f1650680916b06df630bb4a5906c41a079ca42b 1 parent d66035c
Aymeric Augustin aaugustin authored
Showing with 0 additions and 12 deletions.
  1. +0 −12 django/test/client.py
12 django/test/client.py
View
@@ -3,7 +3,6 @@
import os
import re
import mimetypes
-import warnings
from copy import copy
from urlparse import urlparse, urlsplit
try:
@@ -412,17 +411,6 @@ def request(self, **request):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.