With Jinja2 you do not load the tags from the template page.
Django + jinja2. Where to place new template tags?
Question
I've read documentations and more SO questions and do not understand where to place template tags's code and how to load it. I'm very confused with it.
So i have standart django's project with standart file's tree. In django, we created new tags in app_label/templatetags/template.py
and load them from template by {% load template %}
tag.
In jinja2 I do not understand how to reproduce this without any 3rd party apps. Even when i'm using {% load %}
template it raises exception
TemplateSyntaxError at /users/
Encountered unknown tag 'load'.
NOTE
I've read about extensions but don't know where to place it and how to load within template.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow