Skip to content

Commit

Permalink
document new include param
Browse files Browse the repository at this point in the history
  • Loading branch information
yonaskolb committed May 7, 2018
1 parent 47f2b33 commit 1e77f1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/builtins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 1e77f1e

Please sign in to comment.