{ "info": { "author": "Rodrigo Machado", "author_email": "rcmachado@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Tornado + Mako = tomako\n=======================\n\nTomako is a tiny library designed to provide an easy way to use Mako\nas a template engine for Tornado.\n\nThis lib was tested with Tornado 2.3/2.4 and Mako 0.7.2, but should\nwork in other versions - although it wasn't tested in other versions.\n\nUsage\n-----\n\nThe recommended approach is to pass ``template_loader`` configuration\nto ``Application`` class.\n\n.. code-block:: python\n\n from tomako import MakoTemplateLoader\n\n conf = {\n 'template_loader': MakoTemplateLoader('/full/template/path')\n }\n app = Application(urls, **conf)\n\nIf you can't for any reason modify the ``template_loader``\nconfiguration or you want to use Mako as a template engine only on\nsome handlers, you can overwrite ``RequestHandler.create_template_loader``.\n\n.. code-block:: python\n\n from tornado.web import RequestHandler\n from tomako import MakoTemplateLoader\n\n class MyHandler(RequestHandler):\n def create_template_loader(self, template_path):\n return MakoTemplateLoader(template_path)\n\nTornado UIModules\n-----------------\n\nTomako has basic support for Tornado's UIModules_. You must include a\nspecial namespace called ``tomako.template`` in your templates:\n\n.. code-block:: python\n\n # Your python file\n from tornado.web import UIModule\n\n class MyModule(UIModule):\n def render(self, arg1, arg2):\n # do something with args here...\n return 'some string'\n\n.. code-block:: html\n\n \n <%namespace name=\"tomako\" module=\"tomako.template\" />\n\n <%tomako:ui uiclass=\"your.project.module.MyModule\" arg1=\"value1\" arg2=\"value2\" />\n\nInstall\n-------\n\n.. code-block:: shell\n\n pip install tomako\n\nTo-Do\n-----\n\n * Improve support on UIModules\n\nLicense\n-------\n\nThis work is licensed under MIT license (see LICENSE file).\n\n.. _UIModules: http://www.tornadoweb.org/en/stable/overview.html#ui-modules\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rcmachado/tomako", "keywords": "tomako,mako,tornado", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tomako", "package_url": "https://pypi.org/project/tomako/", "platform": "", "project_url": "https://pypi.org/project/tomako/", "project_urls": { "Homepage": "https://github.com/rcmachado/tomako" }, "release_url": "https://pypi.org/project/tomako/0.1.0.post1/", "requires_dist": [ "Mako (>=0.7.2)", "tornado (>=2.3)" ], "requires_python": "", "summary": "Tomako is the easiest way to use Mako as a template engine for Tornado", "version": "0.1.0.post1" }, "last_serial": 2196406, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "74597762d156f52b8716aced94d51f2a", "sha256": "e541e6bad009d3f61956b135757d491bf42c97cb441e7c11ef7a0ef6e9460a9f" }, "downloads": -1, "filename": "tomako-0.1.0.tar.gz", "has_sig": false, "md5_digest": "74597762d156f52b8716aced94d51f2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2403, "upload_time": "2013-04-23T23:05:36", "url": "https://files.pythonhosted.org/packages/66/6f/de5449d401ca6953691c765d7465941e772cf99a3547646edc58cdca452d/tomako-0.1.0.tar.gz" } ], "0.1.0.post1": [ { "comment_text": "", "digests": { "md5": "7717f302d118a8ecc6f0f0fd87002374", "sha256": "ada4758833eb427ff9727fd15dbe9366cc86c65ea82e5f98e10c73acee50f557" }, "downloads": -1, "filename": "tomako-0.1.0.post1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7717f302d118a8ecc6f0f0fd87002374", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6809, "upload_time": "2016-06-30T17:19:34", "url": "https://files.pythonhosted.org/packages/b7/25/f5b20574e4b20945220f9e6523275d18486edb4011dc4401c6ff6ad3ecd9/tomako-0.1.0.post1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a2e9e99be4ddf2263ed441ddc3dfcf96", "sha256": "2d8ec113199408eb16ec00361aac6f10b716925779b6331083f304d01dafd150" }, "downloads": -1, "filename": "tomako-0.1.0.post1.tar.gz", "has_sig": false, "md5_digest": "a2e9e99be4ddf2263ed441ddc3dfcf96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3935, "upload_time": "2016-06-30T17:19:36", "url": "https://files.pythonhosted.org/packages/30/64/e174248281cb2fa8f5bce955d4bd49b253e622bb540a6001e48dec378a07/tomako-0.1.0.post1.tar.gz" } ], "dev": [] }, "urls": [ { "comment_text": "", "digests": { "md5": "7717f302d118a8ecc6f0f0fd87002374", "sha256": "ada4758833eb427ff9727fd15dbe9366cc86c65ea82e5f98e10c73acee50f557" }, "downloads": -1, "filename": "tomako-0.1.0.post1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7717f302d118a8ecc6f0f0fd87002374", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6809, "upload_time": "2016-06-30T17:19:34", "url": "https://files.pythonhosted.org/packages/b7/25/f5b20574e4b20945220f9e6523275d18486edb4011dc4401c6ff6ad3ecd9/tomako-0.1.0.post1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a2e9e99be4ddf2263ed441ddc3dfcf96", "sha256": "2d8ec113199408eb16ec00361aac6f10b716925779b6331083f304d01dafd150" }, "downloads": -1, "filename": "tomako-0.1.0.post1.tar.gz", "has_sig": false, "md5_digest": "a2e9e99be4ddf2263ed441ddc3dfcf96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3935, "upload_time": "2016-06-30T17:19:36", "url": "https://files.pythonhosted.org/packages/30/64/e174248281cb2fa8f5bce955d4bd49b253e622bb540a6001e48dec378a07/tomako-0.1.0.post1.tar.gz" } ] }