summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing/tools.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index 52a00b7ded..6a394bb148 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -458,6 +458,14 @@ Specifically, a ``Response`` object has the following attributes:
>>> response.context['name']
'Arthur'
+ .. admonition:: Not using Django templates?
+
+ This attribute is only populated when using the
+ :class:`~django.template.backends.django.DjangoTemplates` backend.
+ If you're using another template engine,
+ :attr:`~django.template.response.SimpleTemplateResponse.context_data`
+ may be a suitable alternative on responses with that attribute.
+
.. method:: json(**kwargs)
.. versionadded:: 1.9
@@ -494,6 +502,15 @@ Specifically, a ``Response`` object has the following attributes:
loaded from a file. (The name is a string such as
``'admin/index.html'``.)
+ .. admonition:: Not using Django templates?
+
+ This attribute is only populated when using the
+ :class:`~django.template.backends.django.DjangoTemplates` backend.
+ If you're using another template engine,
+ :attr:`~django.template.response.SimpleTemplateResponse.template_name`
+ may be a suitable alternative if you only need the name of the
+ template used for rendering.
+
.. attribute:: resolver_match
.. versionadded:: 1.8