I’m now working with template tags and one thing I haven’t understood is why do template-tags have to be stored inside a templatetags directory in the app. Is there an underlying reason for this? Is it possible to store them in a templatetags.py file somehow so that I can reduce the extra bloat around having extra directories?
I’m now working with template tags and one thing I haven’t understood is why
Share
Django expects you to arrange your apps in certain ways. Requiring a templatetags directory in the app is not the exception. Some other requirements are:
admin.py(for autodiscovery)models.pymanagement/commandsdirectoryfixturesdirectoryUnlike templates, where there are hooks to specify how your templates are loaded, there is no easy way to store your templatetags modules in a different location.