4 ms·
Jinja2 has some crucial features missing in django templates, but we can add this to the django template as filters and functions. On the other hand, many djan
by sharmi 9y ago
Jinja2 has some crucial features missing in django templates, but we can add this to the django template as filters and functions.
On the other hand, many django plugins are written to accommodate only django templates. By choosing jinja2, you will be severely limiting what plugins you can use.
Jinja2 is more like a superset of django templates with some minor syntax modifications.
So I would recommend you go with django templates and bring in jinja2 only if needed (which would be 0.001% of the time)
This is from experience where I went with Jinja2 for one project and learned my lesson. Now for the next one I just went with the default. Some of django template's choices are bit of an hindrance but an affordable price for the interoperability it provides.
- methodover 9y agoCurious comment. What Django plug-ins were you using that caused you problems with Jinja2 templates? We've been using Jinja2 at my startup since the beginning; in the four years I'be been working here I can't recall any issues with plug-ins using it.
- elevensies 9y agoI'm not who you asked, but the first thing that comes to my mind is contrib.auth.views, which look for templates at the default locations or the locations you provide (as described here: https://docs.djangoproject.com/en/1.11/topics/auth/default/#module-django.contrib.auth.views https://docs.djangoproject.com/en/1.11/topics/auth/default/#... ) So using non-django templates would rule out this kind of thing right?