Browse files

[1.1.X] Fixed #11889: Documented the fact that context processors wil…

…l overwrite pre-existing context variables of the same names. Backport of [12669] from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent bca50d2 commit 7adae3028656cb8ea6c2c2c30a7bc747f7e26796 @ubernostrum ubernostrum committed Mar 3, 2010
Showing with 7 additions and 0 deletions.
  1. +7 −0 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
+.. 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::

0 comments on commit 7adae30

Please sign in to comment.