T
T
ThemeZV2016-09-26 20:38:07
Django
ThemeZV, 2016-09-26 20:38:07

How can one template be rendered by multiple applications?

Good day!
In the homepages application, there is a base.html template containing the page structure (including the main menu links that are taken from the database).
There is a Shop application in which we would like to simply extend the base.html template and display our content.
But Django "renders" the template in the current context. Is it possible to process template blocks in multiple applications? How is this done properly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2016-09-26
@ThemeZ

It is done through inclusion_tags (they have their own context and can use a common one) and context_processors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question