def get_template_source(template_name, response_format='html'):
 if ((not response_format) or ('pdf' in response_format) or (response_format not in settings.HARDTREE_RESPONSE_FORMATS)):
  response_format = 'html'
 if (not (('.' + response_format) in template_name)):
  template_name += ('.' + response_format)
 template_name = ((response_format + '/') + template_name)
 t = loader.get_template(template_name)
 f = open(t.filename, 'r')
 return f.read()

def get_template_source ( template_name , response_format = 'html' ) : if ( ( not response_format ) or ( 'pdf' in response_format ) or ( response_format not in settings . HARDTREE_RESPONSE_FORMATS ) ) : response_format = 'html' if ( not ( ( '.' + response_format ) in template_name ) ) : template_name += ( '.' + response_format ) template_name = ( ( response_format + '/' ) + template_name ) t = loader . get_template ( template_name ) f = open ( t . filename , 'r' ) return f . read ( )
retrieves the templates source contents .