diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-01-21 22:29:55 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-01-21 22:29:55 +0000 |
| commit | a07b704d8b5385a90603ecbe0178d80485fd8b84 (patch) | |
| tree | f254859af58e3533daa8eb8485424cd1b863e4e6 /docs | |
| parent | 09ef4c6fa9105e9304f6d1ba62b8843cd90e8c1a (diff) | |
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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/templates.txt | 14 |
1 files changed, 14 insertions, 0 deletions
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 ================================= |
