Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'), )
- directory, file_name = os.path.split(abspath)
- new_settings = {
- 'TEMPLATE_DIRS': (directory,),
- 'TEMPLATE_DEBUG': debug,
- 'DEBUG': debug,
- }
- def render(file, map={}):
- return template.render(
- os.path.join(os.path.dirname(__file__), '../templates', file), map)
- table = render("table.html", {"headers": headers, "rows": rows})
- final = render("final.html", {"table": table})
- self.response.out.write(final)
Add Comment
Please, Sign In to add comment