Z
Z
zelsky2015-11-18 00:09:17
Django
zelsky, 2015-11-18 00:09:17

Should I use inclusion_tag?

Whether to use inclusion_tag to display the latest blog posts in the sidebar.
And does it have a positive effect on something?
Or is it better to write through blocks? {% bloc content %} create different pages with the desired content and render like this ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2015-11-18
@zelsky

Through the blocks

U
un1t, 2015-11-18
@un1t

We abandoned included tags, because it becomes unclear to the layout designer which template is rendered and where to look for it.
It is more convenient to make include. And in the connected file, use the assignment_tag to get the data that needs to be inserted into the template.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question