diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2014-02-23 12:00:24 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2014-02-23 13:52:14 +0100 |
| commit | a36513c2b41f50856144b8b66d5afc71e264b3cc (patch) | |
| tree | 6eb86ca717c67a64bb420203a7353dfd1e4f64e8 | |
| parent | 23cbfc9a254eef6c06252dfd4f8f7b9b7456f8e2 (diff) | |
[1.6.x] Fixed #21881 -- Clarify behavior of {% ssi %} template tag.
When using the `parsed` option, {% ssi %} has the same limitation
as {% include %}, namely that the rendering of the included
template is done separately.
Thanks to trac user nagyv for the report and to alextreme for
the patch.
Backport of 072fb923e1b2e39e85a4ed4569ee7cd94f26a0bb from master.
| -rw-r--r-- | docs/ref/templates/builtins.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 34a20d69ef..62568df2eb 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -951,7 +951,7 @@ current page:: The first parameter of ``ssi`` can be a quoted literal or any other context variable. -If the optional "parsed" parameter is given, the contents of the included +If the optional ``parsed`` parameter is given, the contents of the included file are evaluated as template code, within the current context:: {% ssi '/home/html/ljworld.com/includes/right_generic.html' parsed %} @@ -960,6 +960,13 @@ Note that if you use ``{% ssi %}``, you'll need to define :setting:`ALLOWED_INCLUDE_ROOTS` in your Django settings, as a security measure. +.. note:: + With the :ttag:`ssi` tag and the ``parsed`` parameter + there is no shared state between files -- each include is a completely + independent rendering process. This means it's not possible for example to + define blocks or alter the context in the current page using the included + file. + See also: :ttag:`{% include %}<include>`. .. templatetag:: templatetag |
