Browse files

[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 072fb92 from master.
  • Loading branch information...
1 parent 23cbfc9 commit a36513c2b41f50856144b8b66d5afc71e264b3cc @bmispelon bmispelon committed Feb 23, 2014
Showing with 8 additions and 1 deletion.
  1. +8 −1 docs/ref/templates/builtins.txt
9 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
-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/' 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
+.. 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

0 comments on commit a36513c

Please sign in to comment.