mirror of
https://github.com/django/django.git
synced 2025-05-29 18:26:29 +00:00
Fixed #2096 -- Fixed small error in docs/templates_python.txt. Thanks, ramiro
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3093 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b3a6348bc2
commit
448becefdf
@ -502,12 +502,13 @@ Although the Django template language comes with several default tags and
|
|||||||
filters, you might want to write your own. It's easy to do.
|
filters, you might want to write your own. It's easy to do.
|
||||||
|
|
||||||
First, create a ``templatetags`` package in the appropriate Django app's
|
First, create a ``templatetags`` package in the appropriate Django app's
|
||||||
package. It should be on the same level as ``models``, ``views.py``, etc. For
|
package. It should be on the same level as ``models.py``, ``views.py``, etc. For
|
||||||
example::
|
example::
|
||||||
|
|
||||||
polls/
|
polls/
|
||||||
models/
|
models.py
|
||||||
templatetags/
|
templatetags/
|
||||||
|
views.py
|
||||||
|
|
||||||
Add two files to the ``templatetags`` package: an ``__init__.py`` file and a
|
Add two files to the ``templatetags`` package: an ``__init__.py`` file and a
|
||||||
file that will contain your custom tag/filter definitions. The name of the
|
file that will contain your custom tag/filter definitions. The name of the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user