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 6691,Make it possible for template loaders to optionally return compiled Template object,redvasily,nobody,"Django now uses two stage template loading process: This patch follows our (very) small discussion on mailing list: http://groups.google.ru/group/django-developers/browse_thread/thread/5e54ab5cac98da90?hl=en 1. First find_template_source() which uses settings.TEMPLATE_LOADERS to actually load template 2. get_template_from_string() which is essentially a factory function for Template objects I modified django.template.loader.find_template_source() function and renamed it to find_template() to check if return value of template loader is a tuple - if it's a tuple than standard it proceeds with standard template loading process: {{{ origin = make_origin(display_name, loader, name, dirs) template = Template(template, origin, name) }}} But if it fails to unpack return value of template loader it assumes that template loader returned compiled template object and returns it. This change is backwards compatible and opens a lot of new possibilities for template system. ",New feature,closed,Template system,dev,Normal,fixed,,redvasily@… jefferya@…,Design decision needed,1,1,0,0,0,0