{ "info": { "author": "Tom Gross", "author_email": "itconsense@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Plone", "Framework :: Plone :: 5.0", "Framework :: Plone :: 5.1", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": ".. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.\n If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html\n This text does not appear on pypi or github. It is a comment.\n\n==============================================================================\nHandlebars.js templating for Plone\n==============================================================================\n\n.. image:: https://travis-ci.org/collective/collective.handlebars.svg?branch=master\n :target: https://travis-ci.org/collective/collective.handlebars\n\n.. image:: https://coveralls.io/repos/github/collective/collective.handlebars/badge.svg?branch=master\n :target: https://coveralls.io/github/collective/collective.handlebars?branch=master\n\nThe idea of this package is to provide handlebars.js support for Plone.\nIt is a developer addon and provides additional variants of\nBrowserView, Portlet, Viewlet and Tile which utilizes `handlebars.js `_\ntemplating instead of TAL. It can be used to optimze the workflow\nbetween designers and Plone developers.\n\nThe product was developed and tested with Plone 5 but might work\nwith older versions too.\n\nThis product does not do anything user related on itself!\nIt can not be installed as a Plone addon. What it does is to provide an API\nfor developers to integrate an alternative templating engine into Plone.\n\nFeatures\n--------\n\nThe prodcut provides the following view components with handlebars support:\n\n - BrowserView\n - Plone template\n - Tile\n - Persistent Tile\n\nSince portlets and viewlets do not make any assumtion on the\ntemplating and return everything which is returned by the\nrender-method of the Renderer they are supported too.\n\nExamples\n--------\n\nA handlebars BrowserView: ::\n\n from collective.handlebars.browser.views import HandlebarsBrowserView\n\n class HBSBrowserView(HandlebarsBrowserView):\n\n def get_contents(self):\n return {'msg': u'Hello World!'}\n\nAnd the according configure.zcml: ::\n\n \n\n \n\n\nA handlebar Plone template: ::\n\n from collective.handlebars.browser.views import HandlebarsPloneView\n\n class CarouselView(HandlebarsPloneView):\n\n def get_contents(self):\n images = self.context.listFolderContents(\n contentFilter={'portal_type': ['Image', ]})\n\n slides = [{'title': safe_unicode(img.Title()),\n 'category': safe_unicode(img.Description()),\n 'link': img.remoteUrl,\n 'image': scale(img)} for img in images]\n\n return {'slides': slides, }}\n\nAnd the according configure.zcml: ::\n\n \n\n \n\n \n\nA handlebars portlet: ::\n\n from collective.handlebars.browser.views import HandlebarsMixin\n from plone.app.multilingual.browser.selector import LanguageSelectorViewlet\n\n class LanguageSwitcherRenderer(base.Renderer, HandlebarsMixin):\n \"\"\" Render a language switcher portlet\n \"\"\"\n\n def get_contents(self):\n \"\"\" Get available and current site language\n :return: dictonary ()\n \"\"\"\n viewlet = LanguageSelectorViewlet(self.context, self.request, self, None)\n viewlet.update()\n result = []\n for lang in viewlet.languages():\n result.append(\n {\"lang\": lang['code'].upper(),\n \"url\": lang['url'],\n \"active\": lang['selected'] and 'is_active' or ''})\n\n return {\"languages\": result}\n\n def render(self):\n return self.hbs_snippet(filename='langswitcher.hbs')\n\nA handlebars tile: ::\n\n class ContactPersonTile(HandlebarsTile):\n\n def get_contents(self):\n \"\"\" Get CMS data and put it in a JSON format\n \"\"\"\n\n return {\n 'fullname': u'George Miller',\n 'phone': '+1 50 206 67 99',\n 'email': 'george@example.com',\n }\n\n\nOr a persistent handlebars tile: ::\n\n class ContactPersonTile(HandlebarsPersistentTile):\n\n def get_contents(self):\n \"\"\" Get CMS data and put it in a JSON format\n \"\"\"\n\n return {\n 'fullname': u'George Miller',\n 'phone': '+1 50 206 67 99',\n 'email': 'george@example.com',\n }\n\nAnd the according configure.zcml: ::\n\n \n\n \n\n \n \n\n\nDocumentation\n-------------\n\nFull documentation for end users can be found in the \"docs\" folder.\n\nInstallation\n------------\n\nInstall collective.handlebars by adding it to your buildout::\n\n [buildout]\n\n ...\n\n eggs =\n collective.handlebars\n\n\nand then running ``bin/buildout``\n\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/collective/collective.handlebars/issues\n- Source Code: https://github.com/collective/collective.handlebars\n- Documentation: https://github.com/collective/collective.handlebars/docs\n\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n\n\n\nContributors\n============\n\n- Tom Gross, itconsense@gmail.com\n\n\nChangelog\n=========\n\n\n1.4.1 (2018-10-22)\n------------------\n\n- Add div-element to wrapper to support cases where only text is provided\n (otherwise plone.protect can fail) \n [tomgross]\n\n1.4 (2018-09-10)\n----------------\n\n- Wrap tile so it works with newer versions of Mosaic\n [tomgross]\n\n\n1.3 (2018-04-26)\n----------------\n\n- Set html/body parenthesis for tiles\n [tomgross]\n\n\n1.2 (2016-10-31)\n----------------\n\n- Explicitly set UTF-8 encoding in response\n [tomgross]\n\n\n1.1 (2016-10-28)\n----------------\n\n- Add support for helpers\n [tomgross]\n\n\n1.0 (2016-10-28)\n----------------\n\n- Add persistent tile wrapper\n [tomgross]\n\n- Unify names. It is now **HandlebarsTile**\n [tomgross]\n\n\n1.0rc1 (2016-08-29)\n-------------------\n\n- Add registry for templates\n [tomgross]\n\n- Fix i18n translate tests\n [tomgross]\n\n\n1.0b1 (2016-07-25)\n------------------\n\n- Initial release.\n [tomgross]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.python.org/pypi/collective.handlebars", "keywords": "Python Plone", "license": "GPL version 2", "maintainer": "", "maintainer_email": "", "name": "collective.handlebars", "package_url": "https://pypi.org/project/collective.handlebars/", "platform": "", "project_url": "https://pypi.org/project/collective.handlebars/", "project_urls": { "Homepage": "https://pypi.python.org/pypi/collective.handlebars" }, "release_url": "https://pypi.org/project/collective.handlebars/1.4.1/", "requires_dist": null, "requires_python": "", "summary": "Handlebars for Plone", "version": "1.4.1" }, "last_serial": 4402304, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "ca971a1c32c2523048a869161630711a", "sha256": "d035b034efc2a82a9cd05e008a75cebc9d6212831ebbc036566b60eaa29e677e" }, "downloads": -1, "filename": "collective.handlebars-1.0.tar.gz", "has_sig": false, "md5_digest": "ca971a1c32c2523048a869161630711a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18614, "upload_time": "2016-10-28T12:18:34", "url": "https://files.pythonhosted.org/packages/4a/06/6c5718de314aa58762f43745e9bf187962468a5159b48a0d1caac8f0d4b0/collective.handlebars-1.0.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "220bdbacc8f381c6ca356df1f4f710b6", "sha256": "959112a20cc2fd2f8a10bd26f74db74d67f8af212f945e7e5a369aaf402921d7" }, "downloads": -1, "filename": "collective.handlebars-1.0b1.tar.gz", "has_sig": false, "md5_digest": "220bdbacc8f381c6ca356df1f4f710b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18166, "upload_time": "2016-07-25T09:59:22", "url": "https://files.pythonhosted.org/packages/73/8f/ce82af1c667816677823c24cc6b8e92a8462b6b0df56c4c87344cdce108d/collective.handlebars-1.0b1.tar.gz" } ], "1.0rc1": [ { "comment_text": "", "digests": { "md5": "af13547ce66683a48d4ddb8973af3346", "sha256": "210b00ddf43077b89d243cc69e72ff8b3f238db4db2de6b303f6d52bbd78ebb2" }, "downloads": -1, "filename": "collective.handlebars-1.0rc1.tar.gz", "has_sig": false, "md5_digest": "af13547ce66683a48d4ddb8973af3346", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18376, "upload_time": "2016-08-29T19:09:40", "url": "https://files.pythonhosted.org/packages/b3/60/a6c34d604097df94f99dca610d877767406f0a44152bbe8ae289d4f1bdb0/collective.handlebars-1.0rc1.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "4cd3a8e04f421d0c02996209a6ac3d43", "sha256": "97ad1cc74f79d3879a069fe9f636ab47edd8a8a7f4f111f0798a177d9986dc75" }, "downloads": -1, "filename": "collective.handlebars-1.1.tar.gz", "has_sig": false, "md5_digest": "4cd3a8e04f421d0c02996209a6ac3d43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18767, "upload_time": "2016-10-28T14:04:45", "url": "https://files.pythonhosted.org/packages/8c/53/2b79ab101e9a1c34e28a7f0f2b8b05853bad9d04150c86b57c1625613bc0/collective.handlebars-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "0e095d68b52a16e8605d111024c2fbcc", "sha256": "c15d9aa7d084dd7787f3dd1e425aa2d315129294991961bab2514a0218b7d6a8" }, "downloads": -1, "filename": "collective.handlebars-1.2.zip", "has_sig": false, "md5_digest": "0e095d68b52a16e8605d111024c2fbcc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35168, "upload_time": "2016-10-31T12:27:26", "url": "https://files.pythonhosted.org/packages/f3/10/a9cb0e260af9ec1219692ea50d57429884c7242b23d664c69bd66f8b7816/collective.handlebars-1.2.zip" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "4c891665a42787c1d9b13c718248ac99", "sha256": "387054f972f5ce2e6a2b3fbd6e2e15003b16a8931d93c0b6b4976c5da0450a84" }, "downloads": -1, "filename": "collective.handlebars-1.3.tar.gz", "has_sig": false, "md5_digest": "4c891665a42787c1d9b13c718248ac99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20226, "upload_time": "2018-04-26T09:45:57", "url": "https://files.pythonhosted.org/packages/dc/34/25fbd331c5f8f5c1a0fc11448edee93ecc9546e74b745f63cc520704abb1/collective.handlebars-1.3.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "962f10749c20eb1126d7ebb0239b5724", "sha256": "ef4278f328512148563f878dffcd2f1d9ad50670f0d6d27966f82f885f4a4eeb" }, "downloads": -1, "filename": "collective.handlebars-1.4.1.tar.gz", "has_sig": false, "md5_digest": "962f10749c20eb1126d7ebb0239b5724", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23580, "upload_time": "2018-10-22T14:06:11", "url": "https://files.pythonhosted.org/packages/1d/8b/f54297cbce5f83c350fc7fbc65a414ba044e04214e932c416e618c853f0c/collective.handlebars-1.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "962f10749c20eb1126d7ebb0239b5724", "sha256": "ef4278f328512148563f878dffcd2f1d9ad50670f0d6d27966f82f885f4a4eeb" }, "downloads": -1, "filename": "collective.handlebars-1.4.1.tar.gz", "has_sig": false, "md5_digest": "962f10749c20eb1126d7ebb0239b5724", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23580, "upload_time": "2018-10-22T14:06:11", "url": "https://files.pythonhosted.org/packages/1d/8b/f54297cbce5f83c350fc7fbc65a414ba044e04214e932c416e618c853f0c/collective.handlebars-1.4.1.tar.gz" } ] }