From 00678334aa7fb96d2f5fca3704e61e23317217a7 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Fri, 16 Sep 2011 18:06:42 +0000 Subject: Fixed #16863 -- Corrected ReST markup to avoid errors building docs. Although directives such as "note" and "warning" will accept content immediately following the directive, this is technically where arguments to the directive should go (see http://sphinx.pocoo.org/rest.html#directives). Putting the content there means that any lines beginning with an inline text role (e.g. ":setting:`DEBUG`") will be mis-interpreted as an option block for the directive. To avoid this error, there should always be a blank line between the directive start and the directive content. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16842 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/templates/api.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'docs/ref/templates') diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index c8100fc0f9..2cea3eb7da 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -404,11 +404,12 @@ optional, third positional argument, ``processors``. In this example, the return HttpResponse(t.render(c)) .. note:: + If you're using Django's :func:`~django.shortcuts.render_to_response()` shortcut to populate a template with the contents of a dictionary, your template will be passed a ``Context`` instance by default (not a - ``RequestContext``). To use a ``RequestContext`` in your template rendering, - pass an optional third argument to + ``RequestContext``). To use a ``RequestContext`` in your template + rendering, pass an optional third argument to :func:`~django.shortcuts.render_to_response()`: a ``RequestContext`` instance. Your code might look like this:: @@ -704,12 +705,13 @@ class. Here are the template loaders that come with Django: ) .. note:: - All of the built-in Django template tags are safe to use with the cached - loader, but if you're using custom template tags that come from third - party packages, or that you wrote yourself, you should ensure that the - ``Node`` implementation for each tag is thread-safe. For more - information, see - :ref:`template tag thread safety considerations`. + + All of the built-in Django template tags are safe to use with the + cached loader, but if you're using custom template tags that come from + third party packages, or that you wrote yourself, you should ensure + that the ``Node`` implementation for each tag is thread-safe. For more + information, see :ref:`template tag thread safety + considerations`. This loader is disabled by default. -- cgit v1.3