summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/builtins.txt6
-rw-r--r--docs/releases/1.7.txt5
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index 5b02ab22d1..767906cd8b 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -691,6 +691,12 @@ the variable ``template_name``::
{% include template_name %}
+.. versionchanged:: 1.7
+
+ The variable may also be any object with a ``render()`` method that
+ accepts a context. This allows you to reference a compiled ``Template`` in
+ your context.
+
An included template is rendered with the context of the template that's
including it. This example produces the output ``"Hello, John"``:
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index 2bf7c0258f..d0c3be1688 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -258,6 +258,11 @@ Templates
* The :ttag:`widthratio` template tag now accepts an "as" parameter to capture
the result in a variable.
+* The :ttag:`include` template tag will now also accept anything with a
+ ``render()`` method (such as a ``Template``) as an argument. String
+ arguments will be looked up using
+ :func:`~django.template.loader.get_template` as always.
+
Backwards incompatible changes in 1.7
=====================================