﻿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
579	Split template_file template loading and template location logic	Michael Twomey <micktwomey@…>	Adrian Holovaty	"To make life a little easier for someone using a different templating system (e.g. kid), it'd useful to be able to use django's template location logic to traverse the template directories finding your custom template file.

I've created a patch which splits django.core.template_file.load_template_source into two functions, find_template (which locates a template somewhere in the template directories) and load_template_source which behaves exactly the same as before, except it uses find_template.

An example of it's use in a view:

{{{
from django.core import template_file

def blog_feed(request, ...):
        
    ...get objects...
    
    filename = template_file.find_template(""custom_template.xml"")
    
    renderer = my_custom_renderer(filename, ...)
    
    return HttpResponse(renderer.render(), mimetype=""application/xml"")
}}}"	enhancement	closed	Template system		normal	invalid			Unreviewed	0	0	0	0	0	0
