{ "info": { "author": "4teamwork AG", "author_email": "mailto:info@4teamwork.ch", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Plone :: 4.3", "Framework :: Plone :: 5.1", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. contents:: Table of Contents\n\n\nIntroduction\n============\n\nThis package enhances the integration of `Chameleon`_ in Plone with `five.pt`_.\n\nIn our deployments we have source checkouts (git) which are pulled on updates.\nThis may cause templates to be updated on the next request in running instances,\nwhich may cause errors because the associated code was not yet reloaded because\nthe zope instance was not yet rebooted.\nIn order to make that more robust we use `Chameleon`_ with eager-loading enabled\nand auto-reload disabled, so that after an instance is started it will no longer\nread templates.\n\nThese options do not work as expected when using `five.pt`_ to integrate\n`Chameleon`_ in combination with ``ViewPageTemplateFile`` instances.\n``ftw.chameleon`` contains enhancements for making that work well.\n\n\nEnhancements\n=============\n\n- ``zope.pagetemplate`` is patched on Plone 4 so that it considers the\n ``CHAMELEON_RELOAD`` configuration: when ``CHAMELEON_RELOAD`` is disabled it\n does not trigger a recooking of the template even when it has changed.\n ``CHAMELEON_RELOAD`` is not available in Plone 5 as it already patches\n zope.pagetemplate to not recook templates unless Plone is run in debug mode.\n\n- When ``CHAMELEON_EAGER`` is enabled, all templates will be cooked on startup.\n This is done by explicitly cooking all known templates in a separate thread.\n\n- Fire an event when chameleon compiles templates.\n\n- Log warnings or raise exceptions when templates are compiled unexpectedly.\n This helps to pin-point problems with templates which are not cacheable.\n\n- When ``CHAMELEON_EAGER`` is enabled, the templates in ``portal_skins`` will be\n cooked after the first request on the Plone site.\n\n\nCompatibility\n=============\n\nPlone 4.3.x and Plone 5.1.x.\n\n\nInstallation\n============\n\nBuildout example for **production**:\n\n.. code:: ini\n\n [instance]\n eggs +=\n ftw.chameleon\n environment-vars +=\n CHAMELEON_EAGER true\n CHAMELEON_RELOAD false\n CHAMELEON_CACHE ${buildout:directory}/var/chameleon-cache\n FTW_CHAMELEON_RECOOK_WARNING true\n\nBuildout example for **development**:\n\n.. code:: ini\n\n [instance]\n eggs +=\n ftw.chameleon\n environment-vars +=\n CHAMELEON_RELOAD true\n CHAMELEON_CACHE ${buildout:directory}/var/chameleon-cache\n\n\nYou need to make sure that the cache-directory exists. This can be done with buildout:\n\n.. code:: ini\n\n [buildout]\n parts += chameleon-cache\n\n [chameleon-cache]\n directory = ${buildout:directory}/var/chameleon-cache\n recipe = collective.recipe.shelloutput\n commands =\n cmd1 = mkdir -p ${chameleon-cache:directory}\n\n [instance]\n environment-vars +=\n CHAMELEON_CACHE ${chameleon-cache:directory}\n\n\n\nEnvironment variables\n=====================\n\n+-----------------------------------+-------------------------------------------+-------------------------+-----------------------------+\n| **Name** | **Description** | **Values** | **Recommendation** |\n+-----------------------------------+-------------------------------------------+-------------------------+-----------------------------+\n| ``CHAMELEON_EAGER`` | Parse and compile templates on startup. | ``true``, ``false`` |``true`` |\n+-----------------------------------+-------------------------------------------+-------------------------+-----------------------------+\n| ``CHAMELEON_RELOAD`` (Plone4 only)| Reload templates when they have changed. | ``true``, ``false`` | ``false`` |\n+-----------------------------------+-------------------------------------------+-------------------------+-----------------------------+\n| ``CHAMELEON_CACHE`` | File system cache. | Path to cache directory.| ``.../var/chameleon-cache`` |\n+-----------------------------------+-------------------------------------------+-------------------------+-----------------------------+\n| ``FTW_CHAMELEON_RECOOK_WARNING`` | Warn when recooking templates. | ``true``, ``false`` | ``true`` |\n+-----------------------------------+-------------------------------------------+-------------------------+-----------------------------+\n| ``FTW_CHAMELEON_RECOOK_EXCEPTION``| Raise exception when recooking templates. | ``true``, ``false`` | ``true`` when using Sentry. |\n+-----------------------------------+-------------------------------------------+-------------------------+-----------------------------+\n\nSee also the `Chameleon documentation `_.\n\n\n\nDevelopment\n===========\n\n1. Fork this repo\n2. Clone your fork\n3. Shell: ``ln -s development.cfg buildout.cfg``\n4. Shell: ``python bootstrap.py``\n5. Shell: ``bin/buildout``\n\nRun ``bin/test`` to test your changes.\n\nOr start an instance by running ``bin/instance fg``.\n\n\nLinks\n=====\n\n- Github: https://github.com/4teamwork/ftw.chameleon\n- Issues: https://github.com/4teamwork/ftw.chameleon/issues\n- Pypi: http://pypi.python.org/pypi/ftw.chameleon\n\n\nCopyright\n=========\n\nThis package is copyright by `4teamwork `_.\n\n``ftw.chameleon`` is licensed under GNU General Public License, version 2.\n\n.. _Chameleon: https://pypi.python.org/pypi/Chameleon\n.. _five.pt: https://pypi.python.org/pypi/five.pt\n\nChangelog\n=========\n\n\n1.3.0 (2019-10-01)\n------------------\n\n- Add support for Plone 5.1. [mbaechtold]\n\n- Fix tests for Plone 5.1 [djowett-ftw]\n\n- Remove CHAMELEON_RELOAD option in Plone 5 as it does not recook templates\n when running in production mode (which is our only concern). [djowett-ftw]\n\n\n1.2.0 (2017-12-04)\n------------------\n\n- Require five.pt < 3.0. [mbaechtold]\n\n- Append changelog to long description of package [raphael-s]\n\n\n1.1.2 (2017-06-26)\n------------------\n\n- Skip persistent templates in precook_templates() to avoid attempting to\n operate on a closed ZODB connection. [lgraf]\n\n\n1.1.1 (2016-11-21)\n------------------\n\n- Fix logger name (was ftw.ptcache). [jone]\n\n\n1.1.0 (2016-10-25)\n------------------\n\n- Precook z3c.jbot registered templates. [jone]\n\n\n1.0.0 (2016-10-03)\n------------------\n\n- Initial implementation.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/4teamwork/ftw.chameleon", "keywords": "ftw chameleon", "license": "GPL2", "maintainer": "", "maintainer_email": "", "name": "ftw.chameleon", "package_url": "https://pypi.org/project/ftw.chameleon/", "platform": "", "project_url": "https://pypi.org/project/ftw.chameleon/", "project_urls": { "Homepage": "https://github.com/4teamwork/ftw.chameleon" }, "release_url": "https://pypi.org/project/ftw.chameleon/1.3.0/", "requires_dist": null, "requires_python": "", "summary": "Enhance Chameleon templating engine integration into Plone", "version": "1.3.0" }, "last_serial": 5911262, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "daa452e1f2d3cade69e1cd8f6f9cd833", "sha256": "800d52bb8ddac48b970dfe014c7a3bb3cf61be5b294d18884746ca6590563f90" }, "downloads": -1, "filename": "ftw.chameleon-1.0.0.tar.gz", "has_sig": false, "md5_digest": "daa452e1f2d3cade69e1cd8f6f9cd833", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14250, "upload_time": "2016-10-03T16:35:23", "url": "https://files.pythonhosted.org/packages/73/ff/df48eaf4bc38a7e3c977efd4f3123b4dd7e870de4c5acae877763c4e05ec/ftw.chameleon-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "bac35fa84ab1be06facaa8292da7db23", "sha256": "4c3e57442ab9851ccd9a0507f4a0738109bce9bec7e41e79e3ef27e3fa01f2e7" }, "downloads": -1, "filename": "ftw.chameleon-1.1.0.tar.gz", "has_sig": false, "md5_digest": "bac35fa84ab1be06facaa8292da7db23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14401, "upload_time": "2016-10-25T10:02:12", "url": "https://files.pythonhosted.org/packages/1e/38/f4beb284c1aedff6346b48540e04f73f4204ec50312b338f01580b902d6d/ftw.chameleon-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "5149b93581b53ae57b9d60a710a53348", "sha256": "1df71f7060c97482188c0ed436e946fba7e7e66c74ada728400a5ecb500b8882" }, "downloads": -1, "filename": "ftw.chameleon-1.1.1.tar.gz", "has_sig": false, "md5_digest": "5149b93581b53ae57b9d60a710a53348", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14415, "upload_time": "2016-11-21T12:18:23", "url": "https://files.pythonhosted.org/packages/19/b1/baa1f0e8fa7cfe16c6ca24ec17c2ff5d2f7ec578a92838a2a61ce47530c3/ftw.chameleon-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "70a5251571f3c244beb0c60aca5b64da", "sha256": "2fa98bac42c616e1fcb6a6029be7f67872161ebcfc392402728d533db6da07ca" }, "downloads": -1, "filename": "ftw.chameleon-1.1.2.tar.gz", "has_sig": false, "md5_digest": "70a5251571f3c244beb0c60aca5b64da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14862, "upload_time": "2017-06-26T14:17:20", "url": "https://files.pythonhosted.org/packages/e7/7c/07a0e5134c20855eb44d5e44d0c6df341cf7d80f23207002dc5e96325808/ftw.chameleon-1.1.2.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "1acb6dd560616e24b8e933d800297026", "sha256": "b92ff0d3da9c5d5a1dc0e65642a352ff63dbc28b9e1e5640b795f6f61c7cbb75" }, "downloads": -1, "filename": "ftw.chameleon-1.2.0.tar.gz", "has_sig": false, "md5_digest": "1acb6dd560616e24b8e933d800297026", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16950, "upload_time": "2017-12-04T10:11:08", "url": "https://files.pythonhosted.org/packages/e5/cb/92779315680b4759bebaddbc62414e4fe2db0241cb13246c5f69cd50b5bf/ftw.chameleon-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "5a43e3f1bc9e8837354a88dbc231460b", "sha256": "7d4e08233913356fd4cecc75b94f6d1e0ee5b9c4186e704fafd39b93816c48ad" }, "downloads": -1, "filename": "ftw.chameleon-1.3.0.tar.gz", "has_sig": false, "md5_digest": "5a43e3f1bc9e8837354a88dbc231460b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17778, "upload_time": "2019-10-01T09:21:10", "url": "https://files.pythonhosted.org/packages/82/ec/82f4c3da34c9c99e265e7440cb5163bea8b4a52b030ebafa11cada6883e0/ftw.chameleon-1.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5a43e3f1bc9e8837354a88dbc231460b", "sha256": "7d4e08233913356fd4cecc75b94f6d1e0ee5b9c4186e704fafd39b93816c48ad" }, "downloads": -1, "filename": "ftw.chameleon-1.3.0.tar.gz", "has_sig": false, "md5_digest": "5a43e3f1bc9e8837354a88dbc231460b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17778, "upload_time": "2019-10-01T09:21:10", "url": "https://files.pythonhosted.org/packages/82/ec/82f4c3da34c9c99e265e7440cb5163bea8b4a52b030ebafa11cada6883e0/ftw.chameleon-1.3.0.tar.gz" } ] }