{ "info": { "author": "Vahid Mardani", "author_email": "vahid.mardani@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: Freeware", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries" ], "description": ".. pymlconf documentation master file, created by\n Vahid Mardani on Sat Apr 14 05:05:05 2012.\n You can adapt this file completely to your liking, but it should at least\n contain the root `toctree` directive.\n\nCherrypy's Mako Plugin\n====================================\n\n``CherrypyMako`` is a cherrypy plugin that provides Mako template engine , within cherrypy as a tool.\n\nExample:\n\ndemo.py::\n\n\timport os.path\n\timport cherrypy\n\timport CherrypyMako\n\timport datetime\n\tCherrypyMako.setup()\n\troot_dir = os.path.abspath( os.path.dirname(__file__))\n\t \n\tclass Root(object):\n\t \n\t @cherrypy.expose\n\t @cherrypy.tools.mako(filename='index.html')\n\t def index(self):\n\t return {'currentTime':datetime.datetime.now()}\n\t\n\t \n\t_cp_config={\n\t 'global':{\n\t 'server.socket_host' : '0.0.0.0', \n\t 'server.socket_port' : 1919,\n\t 'tools.mako.directories' : [os.path.join(root_dir,'templates')],\n\t },\n\t}\n\t\n\tif __name__ == '__main__':\n\t cherrypy.quickstart(Root(), '', config=_cp_config)\n\nindex.html::\n\n\t\n\t\t
\n\t\t\t