mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
09ef4c6fa9
commit
a07b704d8b
|
@ -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
|
||||
=================================
|
||||
|
||||
|
|
Loading…
Reference in New Issue