summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2011-05-21 18:36:01 +0000
committerRamiro Morales <cramm0@gmail.com>2011-05-21 18:36:01 +0000
commit50ad59527cc61e7764b6e1ecd8189ae6494bdc3f (patch)
treedfa6cf4da1212573d652a66c2c53cdc08ac0d3a8 /docs/ref
parenta8598c7de2d600fa4c3b4e6d80c2fafb9063215b (diff)
Tweaked some `render_to_response` links in the documentation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16255 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/csrf.txt5
-rw-r--r--docs/ref/template-response.txt2
-rw-r--r--docs/ref/templates/api.txt13
3 files changed, 11 insertions, 9 deletions
diff --git a/docs/ref/contrib/csrf.txt b/docs/ref/contrib/csrf.txt
index 556013ebca..8dc137353c 100644
--- a/docs/ref/contrib/csrf.txt
+++ b/docs/ref/contrib/csrf.txt
@@ -66,8 +66,9 @@ To enable CSRF protection for your views, follow these steps:
# ... view code here
return render_to_response("a_template.html", c)
- You may want to write your own ``render_to_response`` wrapper that
- takes care of this step for you.
+ You may want to write your own
+ :func:`~django.shortcuts.render_to_response()` wrapper that takes care
+ of this step for you.
The utility script ``extras/csrf_migration_helper.py`` can help to automate the
finding of code and templates that may need these steps. It contains full help
diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt
index 90da00220e..1b92d73d48 100644
--- a/docs/ref/template-response.txt
+++ b/docs/ref/template-response.txt
@@ -273,7 +273,7 @@ Using TemplateResponse and SimpleTemplateResponse
A TemplateResponse object can be used anywhere that a normal
HttpResponse can be used. It can also be used as an alternative to
-calling :meth:`~django.shortcuts.render_to_response()`.
+calling :func:`~django.shortcuts.render_to_response()`.
For example, the following simple view returns a
:class:`TemplateResponse()` with a simple template, and a context
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index c997a3c279..2ca08b1fd9 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 ``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 ``render_to_response()``: a ``RequestContext``
+ 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
+ :func:`~django.shortcuts.render_to_response()`: a ``RequestContext``
instance. Your code might look like this::
def some_view(request):
@@ -789,7 +790,7 @@ implement this API we can use third party template systems like `Jinja2
<http://jinja.pocoo.org/2/>`_ or `Cheetah <http://www.cheetahtemplate.org/>`_. This
allows us to use third-party template libraries without giving up useful Django
features like the Django ``Context`` object and handy shortcuts like
-``render_to_response()``.
+:func:`~django.shortcuts.render_to_response()`.
The core component of the Django templating system is the ``Template`` class.
This class has a very simple interface: it has a constructor that takes a single