﻿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
32290	TemplateNotFound if relative path passed to {% include %} in variable	Peter Inglesby	Hasan Ramezani	"If you pass a template path as string literal to `{% include %}`, the template path can begin with eg `./`, which is then resolved.

However, if you pass a template path in a variable to `{% include %}`, the `./` is not resolved and Django raises `TemplateNotFound`.

For instance, I have a template for rendering Bootstrap tab panels:

{{{
<div
      class=""tab-pane fade p-4""
      id=""{{ tab_name }}""
      role=""tabpanel""
      aria-labelledby=""{{ tab_name }}-tab""
>
  {% include template_path %}
</div>
}}}

This works:

{{{
{% include ""./_bootstrap_panel.html"" with tab_name=""search-results"" template_name=""myapp/_search_results.html"" %}
}}}

This doesn't:

{{{
{% include ""./_bootstrap_panel.html"" with tab_name=""search-results"" template_name=""./_search_results.html"" %}
}}}"	Bug	closed	Template system	3.1	Normal	fixed			Ready for checkin	1	0	0	0	0	0
