[1.7.x] Fixed #23529 -- Replaced comments tag library with humanize in docs
Backport of ee442e97da
from master.
This commit is contained in:
parent
8a78257133
commit
02b3a6dcc0
|
@ -666,18 +666,18 @@ Custom tag and filter libraries
|
||||||
Certain applications provide custom tag and filter libraries. To access them in
|
Certain applications provide custom tag and filter libraries. To access them in
|
||||||
a template, use the :ttag:`load` tag::
|
a template, use the :ttag:`load` tag::
|
||||||
|
|
||||||
{% load comments %}
|
{% load humanize %}
|
||||||
|
|
||||||
{% comment_form for blogs.entries entry.id with is_public yes %}
|
{{ 45000|intcomma }}
|
||||||
|
|
||||||
In the above, the :ttag:`load` tag loads the ``comments`` tag library, which then
|
In the above, the :ttag:`load` tag loads the ``humanize`` tag library, which then
|
||||||
makes the ``comment_form`` tag available for use. Consult the documentation
|
makes the ``intcomma`` filter available for use. Consult the documentation
|
||||||
area in your admin to find the list of custom libraries in your installation.
|
area in your admin to find the list of custom libraries in your installation.
|
||||||
|
|
||||||
The :ttag:`load` tag can take multiple library names, separated by spaces.
|
The :ttag:`load` tag can take multiple library names, separated by spaces.
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
{% load comments i18n %}
|
{% load humanize i18n %}
|
||||||
|
|
||||||
See :doc:`/howto/custom-template-tags` for information on writing your own custom
|
See :doc:`/howto/custom-template-tags` for information on writing your own custom
|
||||||
template libraries.
|
template libraries.
|
||||||
|
@ -689,9 +689,9 @@ 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
|
available to the current template -- not any parent or child templates along
|
||||||
the template-inheritance path.
|
the template-inheritance path.
|
||||||
|
|
||||||
For example, if a template ``foo.html`` has ``{% load comments %}``, a child
|
For example, if a template ``foo.html`` has ``{% load humanize %}``, a child
|
||||||
template (e.g., one that has ``{% extends "foo.html" %}``) will *not* have
|
template (e.g., one that has ``{% extends "foo.html" %}``) will *not* have
|
||||||
access to the comments template tags and filters. The child template is
|
access to the humanize template tags and filters. The child template is
|
||||||
responsible for its own ``{% load comments %}``.
|
responsible for its own ``{% load humanize %}``.
|
||||||
|
|
||||||
This is a feature for the sake of maintainability and sanity.
|
This is a feature for the sake of maintainability and sanity.
|
||||||
|
|
Loading…
Reference in New Issue