From a07b704d8b5385a90603ecbe0178d80485fd8b84 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 21 Jan 2006 22:29:55 +0000 Subject: [PATCH] Added 'Custom libraries and template inheritance' section to docs/templates.txt git-svn-id: http://code.djangoproject.com/svn/django/trunk@2098 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/templates.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/templates.txt b/docs/templates.txt index 78e94c5b54..20fe62bbae 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -283,6 +283,20 @@ Example:: {% load comments i18n %} +Custom libraries and template inheritance +----------------------------------------- + +When you load a custom tag or filter library, the tags/filters are only made +available to the current template -- not any parent or child templates along +the template-inheritance path. + +For example, if a template ``foo.html`` has ``{% load comments %}``, a child +template (e.g., one that has ``{% extends foo %}`` will *not* have access to +the comments template tags and filters. The child template is responsible for +its own ``{% load comments %}``. + +This is a feature for the sake of maintainability and sanity. + Built-in tag and filter reference =================================