from django.core import template register = template.Library() def do_my_tag(parser, token): pass register.tag('my_tag', do_my_tag)