Commit 840e97ab authored by Benjamin Wohlwend's avatar Benjamin Wohlwend Committed by Tim Graham
Browse files

[1.8.x] Refs #24622 -- Documented alternatives to some test response...

[1.8.x] Refs #24622 -- Documented alternatives to some test response attributes when using alternative template engines.

Backport of 2b9eed41 from master
parent 6861c202
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -436,6 +436,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.

    .. attribute:: request

        The request data that stimulated the response.
@@ -460,6 +468,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