Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (13 sloc) 431 Bytes
import os
from google.appengine.ext.webapp import template
class TemplateHelper():
def __init__(self, writer, template = "", values = {}):
self.writer = writer
if template:
self.path = os.path.join(os.path.dirname(__file__),
'templates/%s.html' % template)
else:
self.path = None
self.values = values
def render(self):
self.writer.write(template.render(self.path, self.values))