Commit 7beca4d3 authored by Luke Plant's avatar Luke Plant
Browse files

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
parent b0590110
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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: