def templates_for_host(templates):
 if (not isinstance(templates, (list, tuple))):
  templates = [templates]
 theme_dir = host_theme_path()
 host_templates = []
 if theme_dir:
  for template in templates:
   host_templates.append((u'%s/templates/%s' % (theme_dir, template)))
   host_templates.append(template)
  return host_templates
 return templates

def templates_for_host ( templates ) : if ( not isinstance ( templates , ( list , tuple ) ) ) : templates = [ templates ] theme_dir = host_theme_path ( ) host_templates = [ ] if theme_dir : for template in templates : host_templates . append ( ( u'%s/templates/%s' % ( theme_dir , template ) ) ) host_templates . append ( template ) return host_templates return templates
given a template name .