Контекстный процессор в django
To display product categories on the site in several views, I get information about the categories from the database. (Do this in at least 8 views)
I use context processor to prevent duplicate codes. Is this method better and more efficient?
In fact, by creating a context processor, I only get the category information from the database once and do not write it in any view anymore.
Есть ли лучший вариант?