summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJames Bennett <ubernostrum@gmail.com>2010-03-03 08:44:22 +0000
committerJames Bennett <ubernostrum@gmail.com>2010-03-03 08:44:22 +0000
commit7adae3028656cb8ea6c2c2c30a7bc747f7e26796 (patch)
tree5bd23561c4e3eb6bcca052758157379948265d1a /docs
parentbca50d20d3abeb9e641d9d257fd4674344ac7f28 (diff)
[1.1.X] Fixed #11889: Documented the fact that context processors will overwrite pre-existing context variables of the same names. Backport of [12669] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/api.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index a1cc7ea760..c2b594b9f0 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -318,6 +318,13 @@ variable to the context and a second processor adds a variable with the same
name, the second will override the first. The default processors are explained
below.
+.. admonition:: When context processors are applied
+ When you use ``RequestContext``, the variables you supply directly
+ are added first, followed any variables supplied by context
+ processors. This means that a context processor may overwrite a
+ variable you've supplied, so take care to avoid variable names
+ which overlap with those supplied by your context processors.
+
Also, you can give ``RequestContext`` a list of additional processors, using the
optional, third positional argument, ``processors``. In this example, the
``RequestContext`` instance gets a ``ip_address`` variable::