{ "info": { "author": "Lennart Regebro, Guido Wesdorp", "author_email": "regebro@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 7 - Inactive", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python :: 2 :: Only", "Topic :: Internet :: WWW/HTTP" ], "description": "Update 2013-05-27: I'm no longer using this project, if somebody wants to take over maintanance, email me.\r\n\r\nmegrok.genshi\r\n=============\r\n\r\nmegrok.genshi makes it possible to use Genshi templates in Grok. The project is no longer maintained due to lack of usage, but can still work as an example of how to do template integration in Grok.\r\n\r\nFor more information on Grok and Genshi see:\r\n\r\n- http://grok.zope.org/\r\n- http://genshi.edgewall.org/\r\n\r\nRequirements\r\n------------\r\n\r\n- Genshi. Tested with v 0.5.1.\r\n- Grok v0.14 or later. Tested with 0.14.\r\n\r\nInstallation\r\n------------\r\n\r\nTo use Genshi under Grok all you need is to install megrok.genshi as an egg \r\nand include it's zcml. The best place to do this is to make megrok.genshi\r\na dependency of your application by adding it to your install_requires\r\nlist in setup.cfg. If you used grokprojet to create your application setup.cfg\r\nis located in the project root. It should look something like this::\r\n\r\n install_requires=['setuptools',\r\n 'grok',\r\n 'megrok.genshi',\r\n # Add extra requirements here\r\n ],\r\n\r\nThen include megrok.genshi in your configure.zcml. If you used grokproject to\r\ncreate your application it's at src//configure.zcml. Add the\r\ninclude line after the include line for grok, but before the grokking of the\r\ncurrent package. It should look something like this::\r\n\r\n \r\n \r\n \r\n \r\nThen run bin/buildout again. You should now see buildout saying something like::\r\n\r\n Getting distribution for 'megrok.genshi'.\r\n Got megrok.genshi 1.0.\r\n\r\nThat's all. You can now start using Genshi in your Grok application!\r\n\r\n\r\nUsage\r\n-----\r\n\r\nmegrok.genshi supports the Grok standard of placing templates in a templates\r\ndirectory, for example app_templates, so you can use Genshi by simply placing\r\nthe Genshi templates in the templates directory, just as you would with ZPT\r\ntemplates. Although Genshi itself doesn't have a standard for the file\r\nextensions for Genshi templates, Grok needs to have an association between an\r\nextension and a type so it knows which type of template each template is.\r\nmegrok.genshi defines the extension .g for Genshi HTML templates and .gt for\r\nGenshi Text templates. Genshi can also include templates, and although you can\r\nuse any extension for this we recommend you use .gi for any include templates,\r\nto avoid any clashes with other templating languages.\r\n\r\nYou can also use Genshi templates inline. The syntax for this is::\r\n\r\n from megrok.genshi.components import GenshiMarkupTemplate, GenshiTextTemplate\r\n index = GenshiMarkupTemplate('the html code')\r\n index = GenshiMarkupTemplate('Text templates')\r\n\r\nOr if you use files::\r\n\r\n from megrok.genshi.components import GenshiMarkupTemplate, GenshiTextTemplate\r\n index = GenshiMarkupTemplate(filename='thefilename.html')\r\n index = GenshiMarkupTemplate(filename='thefilename.txt')\r\n\r\n\r\nAuthors\r\n-------\r\n\r\n- Lennart Regebro (regebro@gmail.com)\r\n- Guido Wesdorp\r\n\r\n\r\nCHANGES\r\n=======\r\n\r\nVersion 1.0\r\n-----------\r\n\r\n- Support for Grok 0.14. (Paul Wilson)\r\n\r\nVersion 0.9\r\n-----------\r\n\r\n- Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.zope.org/megrok.genshi/", "keywords": "grok genshi", "license": "ZPL", "maintainer": "", "maintainer_email": "", "name": "megrok.genshi", "package_url": "https://pypi.org/project/megrok.genshi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/megrok.genshi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://svn.zope.org/megrok.genshi/" }, "release_url": "https://pypi.org/project/megrok.genshi/1.0/", "requires_dist": null, "requires_python": null, "summary": "Genshi integration in Grok", "version": "1.0" }, "last_serial": 709272, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "2b8faafeea057631279ef9764ab96457", "sha256": "2d4cb664053b8177b23babfab654f750c4a95889706140912a8cbb8dd3bd3d78" }, "downloads": -1, "filename": "megrok.genshi-0.9.tar.gz", "has_sig": false, "md5_digest": "2b8faafeea057631279ef9764ab96457", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7737, "upload_time": "2007-11-18T13:29:44", "url": "https://files.pythonhosted.org/packages/47/4c/67b6b8d6d317419830712462b192e3faf32072169211c4d33ce276f8a95e/megrok.genshi-0.9.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "deefe3bb31b02c00cedd108525f5f370", "sha256": "63207ee42d3f9e5a779a5f975df4aa06147209239d802843e2906ef3752149dd" }, "downloads": -1, "filename": "megrok.genshi-1.0.zip", "has_sig": false, "md5_digest": "deefe3bb31b02c00cedd108525f5f370", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15615, "upload_time": "2008-12-09T17:06:27", "url": "https://files.pythonhosted.org/packages/c9/d8/af098693b2e16945c8aced6914a058e202ac60011e305bcce82933b0352c/megrok.genshi-1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "deefe3bb31b02c00cedd108525f5f370", "sha256": "63207ee42d3f9e5a779a5f975df4aa06147209239d802843e2906ef3752149dd" }, "downloads": -1, "filename": "megrok.genshi-1.0.zip", "has_sig": false, "md5_digest": "deefe3bb31b02c00cedd108525f5f370", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15615, "upload_time": "2008-12-09T17:06:27", "url": "https://files.pythonhosted.org/packages/c9/d8/af098693b2e16945c8aced6914a058e202ac60011e305bcce82933b0352c/megrok.genshi-1.0.zip" } ] }