def loadTemplate( self, templateName ): # FIXME: make even more sure this is safe assert '..' not in templateName path = os.path.join( self.basePath, templateName ) data = open( path, 'rb' ).read( ) return Template.fromString( self, data, name=templateName )
def templateFromString( self, data, templateName=None ): return Template.fromString( self, data, name=templateName )