Write yourself a context processor and register it in your
settings.TEMPLATE_CONTEXT_PROCESSORS. For example, registering
myapp.context_processors.template_defaults:
# myapp/context_processors.py
def template_defaults(request):
return {
"BASE_TEMPLATE": "base/base.html",
Hi,
my Django project has several apps, and each app contains a constant
named APPLABEL. This constant should be passed to all templates, but
I'd like to avoid adding it to each rendering context manually. Is
that possible?
Thanks,
Jan
--
You received this message because you are subscribed to
2 matches
Mail list logo