[Answer]-Load common content for the whole Django site

1👍

No, you should not, Django provides several mechanisms to take care of that kind of issues.

Context processors are functions that are called each time a template is rendered and which output populates that template’s context. They allow you to have the same variables available everywhere in your templates.

Custom template tags and especially inclusion tags allow you to output content anywhere in a template by just calling them, which is as simple as {% my_tag_name %}.

These two mechanism coupled with template inheritance and inclusion allow you to not repeat code that is shared across many pages.

👤aumo

Leave a comment