I am trying to put a variable from the context processor into the 'extends' tag template:
{% extends {{ base_template|default:"mainpage.html" }} %}
but I got an exception:
Exception Value: 'extends' takes one argument
my context_processors.py:
from django.conf import settings
def search(request):
"""Adds settings for test"""
return {
'base_template' : settings.BASE_TEMPLATE,
}
and settings.py:
...
BASE_TEMPLATE = "test/base.html"
...
Can you help me? Thank!
user283596
source
share