In order to use this you should create two files:
an empty one called __init__.py and
one containing the above code called path_match.py
Then put them into a folder called "templatetags" inserted at the application root (same level as views.py ).
Then before using the {% path_match %} tag you should load the tag definition by inserting {% load path_match %}
in the template file in which you will use the path_match tag.
For more informations see http://www.djangobook.com/en/1.0/chapter10/#cn92
Comments
In order to use this you should create two files: an empty one called __init__.py and one containing the above code called path_match.py
Then put them into a folder called "templatetags" inserted at the application root (same level as views.py ).
Then before using the {% path_match %} tag you should load the tag definition by inserting {% load path_match %} in the template file in which you will use the path_match tag.
For more informations see http://www.djangobook.com/en/1.0/chapter10/#cn92
#