def template_info(template_name):
 if (template_name in _template_info_cache):
  t_data = _template_info_cache[template_name]
  return (t_data['template_path'], t_data['template_type'])
 template_path = find_template(template_name)
 if (not template_path):
  raise TemplateNotFound(('Template %s cannot be found' % template_name))
 t_type = template_type(template_path)
 if (not config.get('debug', False)):
  t_data = {'template_path': template_path, 'template_type': t_type}
  _template_info_cache[template_name] = t_data
 return (template_path, t_type)

def template_info ( template_name ) : if ( template_name in _template_info_cache ) : t_data = _template_info_cache [ template_name ] return ( t_data [ 'template_path' ] , t_data [ 'template_type' ] ) template_path = find_template ( template_name ) if ( not template_path ) : raise TemplateNotFound ( ( 'Template %s cannot be found' % template_name ) ) t_type = template_type ( template_path ) if ( not config . get ( 'debug' , False ) ) : t_data = { 'template_path' : template_path , 'template_type' : t_type } _template_info_cache [ template_name ] = t_data return ( template_path , t_type )
returns the path and type for a template .