3 ms·
Why Jinja is not Django and why Django should have a look at it
- snprbob86 18y agoI've been using Django for a while and have two major complaints: 1) newforms sometimes takes some serious wrestling to make co-operative 2) The template system bites! We plan to move to Jinja2 after we finally launch something. However, the biggest blocker for us is lack of auto-escaping.
- newt0311 18y agoFrom the article: "I am not a compiler guy." It shows. Queryset performance is completely divorced from the performance of the template engine as querysets are coded natively in python and just called from the AST evaluator. Also, code generation is incredibly complex (at least compared to an AST evaluator) so unless you convert to something much much faster like machine-code, it's usually not worth the effort (which considering Django's speed relative to other frameworks seems to be the case). Sorry. Some myths about AST compilers grate at me sometimes.
- snprbob86 18y agoI'm more interested in the lexing/parsing problems and how they apply to writing custom tags. It is also nice to have a more complete expression language. I don't really buy into the strict logic separation argument, but then again my team is composed entirely of Python programmers.
- newt0311 18y agoFrankly, lexing and parsing is boring. Custom tags can be easily accounted for by treating them as a symbol as is done in other programming languages.