[Django]-Jinja – load custom template tag set

6👍

The same mechanism exists but with a different name.

It’s called Extensions

👤bchhun

0👍

Since Django 1.8, Jinja2 is a built-in option as a template backend. In the Django docs they describe how to simulate some of Django’s native template engine’s context processors, filters and tags:

https://docs.djangoproject.com/en/1.8/topics/templates/#django.template.backends.jinja2.Jinja2

There’s also a project with extensions for Jinja2 that simulate some template tags from Django. They work the same as Django’s template tags but are essentially less Jinja2-onic:

https://github.com/MoritzS/jinja2-django-tags

Leave a comment