I\'ve created a custom tag that I want to use, but Django can\'t seem to find it. My templatetags directory is set up like this:
pygmentize
I had the same problem, here's how I solved it. Following the first section of this very excellent Django tutorial, I did the following:
python manage.py startapp new_appsettings.py file, adding the following to the list of INSTALLED_APPS: 'new_app',new_app package named new_app_tags.{% extends 'base_template_name.html' %}: {% load new_app_tags %}new_app_tags module file, create a custom template tag (see below).{% multiply_by_two | "5.0" %}Example from step 5 above:
from django import template
register = template.Library()
@register.simple_tag
def multiply_by_two(value):
return float(value) * 2.0