fb_pixel

Is there an analogue of inclusion.tag in jinja2?

Development | Web Development
Description
Tell me about this problem: you need to insert several other rendered templates into the basic site template.
If the project were on a jung template, you could write to templatetag/mytag.py

@ register.inclusion_tag('results.html')
def show_results(poll):
  ...

and in the template
{% load mytag%}
{% show_results poll%}

However, jinja2 neither the load tag nor the inclusion.tag does not understand. Tell me, can anyone know a competent solution to this problem for jinja2?
Attachments
No attachments
Info
Description
Use macro
on January 18th, 2020 (6:55 pm)
All coments
This job has not been commented yet.