summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2008-01-31 22:49:14 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2008-01-31 22:49:14 +0000
commitd3d5861ac29f094b865580fbd31c324a2013bf94 (patch)
tree9b8646945ca83c848f902086c0e5b4aae9b88cb3 /docs
parent28353a682dcd37ebbf6de886fa0f0e4719c53166 (diff)
Fixed #6502 -- Documented `context_instance` argument of `render_to_response`, thanks `SmileyChris`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/shortcuts.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/docs/shortcuts.txt b/docs/shortcuts.txt
index 19eac4be6d..2030ea72fe 100644
--- a/docs/shortcuts.txt
+++ b/docs/shortcuts.txt
@@ -22,16 +22,29 @@ Required arguments
Optional arguments
------------------
-``context``
+``dictionary``
A dictionary of values to add to the template context. By default, this
is an empty dictionary. If a value in the dictionary is callable, the
view will call it just before rendering the template.
+``context_instance``
+ The context instance to render the template with. By default, the template
+ will be rendered with a ``Context`` instance (filled with values from
+ ``dictionary``). If you need to use `context processors`_, you will want to
+ render the template with a ``RequestContext`` instance instead. Your code
+ might look something like this::
+
+ return render_to_response('my_template.html',
+ my_data_dictionary,
+ context_instance=RequestContext(request))
+
``mimetype``
**New in Django development version:** The MIME type to use for the
resulting document. Defaults to the value of the ``DEFAULT_CONTENT_TYPE``
setting.
+.. _`context processors`: ../templates_python/#subclassing-context-requestcontext
+
Example
-------