i have template base.html and some children templates. I don't know how to set variables for base.html
for example if i have {% for u in users %}{% endfor %} where do I assign it to users? is there some parent view for all views?
If you want certain variables to be available in all templates, you could write a template context processor (docs) and make sure you always use RequestContext when rendering templates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With