I would do it the same way Django provides its additional template tags, that is, it creates its own package / application ( django.contrib.humanize , django.contrib.markup , django.contrib.webdesign )
These are just three “normal” packages, inside of which there are templatetags . The name of the module inside tempaltetags is the name of the package / application (for example, humanize.py ).
Then put it somewhere where Python can find it.
You can also create some kind of “meta-package” templatetags and put everything there, for example.
templatetags - navigation - __init__.py - templatetags - _init__.py - navigation.py - other - ...
Of course, you should add them to you INSTALLED_APPS (for example, templatetags.navigation ) and load them into your template (for example, {% load navigation %} ).
source share