diff options
| author | James Bennett <ubernostrum@gmail.com> | 2010-03-03 08:43:05 +0000 |
|---|---|---|
| committer | James Bennett <ubernostrum@gmail.com> | 2010-03-03 08:43:05 +0000 |
| commit | cdd95077a6c7ebd794dc6cfc41085f9da46f3d96 (patch) | |
| tree | 43edab82cafd766557fc56bce22b241fe8b1d8e3 /docs/ref | |
| parent | 1f56ed7319a20f3508a6629d3bca83c523e9d4f3 (diff) | |
Fixed #11889: Documented the fact that context processors will overwrite pre-existing context variables of the same names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/templates/api.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index 90e2c76dbe..afa16938ff 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -335,6 +335,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:: |
