Ticket #2096: templates_python.txt.diff
File templates_python.txt.diff, 705 bytes (added by , 18 years ago) |
---|
-
templates_python.txt
old new 502 502 filters, you might want to write your own. It's easy to do. 503 503 504 504 First, create a ``templatetags`` package in the appropriate Django app's 505 package. It should be on the same level as ``models ``, ``views.py``, etc. For505 package. It should be on the same level as ``models.py``, ``views.py``, etc. For 506 506 example:: 507 507 508 508 polls/ 509 models /509 models.py 510 510 templatetags/ 511 views.py 511 512 512 513 Add two files to the ``templatetags`` package: an ``__init__.py`` file and a 513 514 file that will contain your custom tag/filter definitions. The name of the