hallowed-architect-39752
07/30/2022, 11:12 PMbase_template. Its value depends on whether or not the request was used with htmx or not, as per the tip on https://django-htmx.readthedocs.io/en/latest/tips.html.
python
def htmx_base_template(request):
if request.htmx and not request.htmx.boosted:
base_template = "partial.html"
else:
base_template = "base.html"
return {
"base_template": base_template,
}