I am switching to Jinja2 because Django Templates does not allow passing arguments to methods.
Regular Jinja2 does not allow passing arguments within include in a single line.
{% include "../partials/pagination.html" with listings=page_obj %}
That code won't work and it throws this error: ("expected token 'end of statement block', got 'with'",).
You have to split the line into multiple, which makes it uglier and it sucks.
{% with listings=page_obj %}
{% include "../partials/pagination.html" %}
{% endwith %}
And doing this with many tags is redundant.
Can you make Django-Jinja allow with inside other tags like Django Template?
I am switching to Jinja2 because Django Templates does not allow passing arguments to methods.
Regular Jinja2 does not allow passing arguments within
includein a single line.That code won't work and it throws this error:
("expected token 'end of statement block', got 'with'",).You have to split the line into multiple, which makes it uglier and it sucks.
And doing this with many tags is redundant.
Can you make Django-Jinja allow
withinside other tags like Django Template?