﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31915	Allow load template tag before extends tag	Jann Haber	nobody	"Currently the extends template tag always needs to be the first template tag used in a template (if it is used at all). In the extends tag, it is possible to use the built-in template tags. For example, with Django 3.0, we have been using different base templates depending on if a request was an ajax request or not:

{{{
{% extends request.is_ajax|yesno:""base_ajax.html,base.html"" %}
}}}

Once the is_ajax method is removed from the request objects, this is not possible anymore. A new template tag for ""is_ajax"" could be created (like {{{ {% extends request|is_ajax|yesno... %} }}}), but it is not possible to load it before extends, since extends always needs to be the first template tag. The only possible workaround I see to achieve the same behaviour, is to create a context processor, however this will be processed for all requests, even the ones that don't need this feature.

All in all, I am requesting to allow load template tags before ""extends""."	New feature	closed	Template system	dev	Normal	wontfix			Unreviewed	0	0	0	0	0	0
