예제 #1
0
	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 )
예제 #2
0
	def templateFromString( self, data, templateName=None ):
		return Template.fromString( self, data, name=templateName )