CherrypyMakoMako tool for Cherrypy | |
Download |
CherrypyMako Ranking & Summary
Advertisement
- License:
- Freeware
- Price:
- FREE
- Publisher Name:
- Vahid Mardani
- Publisher web site:
- http://pylover.dobisel.com/
CherrypyMako Tags
CherrypyMako Description
CherrypyMako is a Cherrypy plugin that provides Mako template engine, within Cherrypy as a tool.Example:demo.py:import os.pathimport cherrypyimport CherrypyMakoimport datetimeCherrypyMako.setup()root_dir = os.path.abspath( os.path.dirname(__file__))class Root(object): @cherrypy.expose @cherrypy.tools.mako(filename='index.html') def index(self): return {'currentTime':datetime.datetime.now()}_cp_config={ 'global':{ 'server.socket_host' : '0.0.0.0', 'server.socket_port' : 1919, 'tools.mako.directories' : , },}if __name__ == '__main__': cherrypy.quickstart(Root(), '', config=_cp_config)index.html:< html > < head > < title >Cherrypy Mako Tool Demo< /title > < /head > < body > ${currentTime} < /body >< /html >Product's homepage
CherrypyMako Related Software