Answer the question
In order to leave comments, you need to log in
How to properly break a template in Django?
Hello.
I have base template base and many other pages that extend base.
In the view, I do my own logic for each page, I render, everything is fine,
but in the base template there is a sidebar visible on all pages, which counts the number of all products, but
I can only transfer logic for one page.
How can I make the logic for the base template or still pass data for the sidebar in each template?
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