From 1e77f1e85f5a1226f2d5e82104a6ef23713073ae Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 7 May 2018 18:46:20 +1000 Subject: [PATCH] document new include param --- docs/builtins.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/builtins.rst b/docs/builtins.rst index 9d61ecaa..d4cc99a3 100644 --- a/docs/builtins.rst +++ b/docs/builtins.rst @@ -260,6 +260,12 @@ You can include another template using the `include` tag. {% include "comment.html" %} +By default the included file gets passed the current context. You can pass a sub context by using an optional 2nd parameter as a lookup in the current context. + +.. code-block:: html+django + + {% include "comment.html" comment %} + The `include` tag requires you to provide a loader which will be used to lookup the template.