Answer the question
In order to leave comments, you need to log in
Is there an analogue of inclusion.tag in jinja2?
Good afternoon!
Tell me about this problem: you need to insert several other rendered templates into the base site template.
If the project was on a Dzhang template engine, then it could be written in templatetag/mytag.py
@register.inclusion_tag('results.html')
def show_results(poll):
...
{% load mytag %}
{% show_results poll %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question