z3c.jbot


Namez3c.jbot JSON
Version 2.0 PyPI version JSON
download
home_pagehttps://github.com/zopefoundation/z3c.jbot
SummaryDrop-in template overrides.
upload_time2023-05-04 14:37:56
maintainer
docs_urlNone
authorZope Foundation and Contributors
requires_python>=3.7
licenseZPL 2.1
keywords page template override
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Overview
========

The ``z3c.jbot`` (or "Just a bunch of templates") package allows easy
customization of existing templates and images. It works on Zope 2 and
Zope 3.

The Chameleon rendering engine is supported [#]_.

Use of this package adds a small (2-3 ms per request on Plone) to the
total application response time.

.. [#] To enable Chameleon on Zope 2, use the ``five.pt`` package (CMF-apps like Plone should use ``cmf.pt`` which adds full support).

Usage
-----

To override a particular file, first determine its *canonical
filename*. It's defined as the path relative to the package within
which the file is located; directory separators are replaced with
dots.

Example:

  Suppose you want to override: /plone/app/layout/viewlets/logo.pt

  You would use the filename:   plone.app.layout.viewlets.logo.pt

Simply drop the file in a directory and register that directory for
use with jbot using a ZCML-directive::

  <include package="z3c.jbot" file="meta.zcml" />

  <browser:jbot
      directory="<path>"
      layer="<layer>" />

Templates in views, viewlets and portlets
-----------------------------------------

Any template that is defined as a class-attribute can be overriden
using jbot, e.g. those used in views, viewlets and portlets. The
template overrides may be registered for any request layer or only a
specific layer.

CMF objects
-----------

Any skin-object (e.g. images, templates) on the file system (directory
views) can be overridden.

Plone resources
---------------

If `plone.resource` is installed, it's possible to use jbot to
override filesystem resources.

Author
------

Malthe Borch <mborch@gmail.com>

Changes
=======

2.0 (2023-05-04)
----------------

- Add support for Python 3.9, 3.10, 3.11.

- Drop support for Python 2.7, 3.5, 3.6.


1.1.1 (2021-08-18)
------------------

- Fix error in find_zope2_product: "TypeError: expected str, bytes or os.PathLike object, not list".
  [jensens]


1.1.0 (2020-09-20)
------------------

- Added support for static resource registered using the "static"
  directive of `plone.resource`.
  [malthe]


1.0.0 (2020-08-25)
------------------

- Breaking: Remove long deprecated backward compatibility imports of getSite and setHooks.
  [jensens]

- Fix #8:  Broken on Windows (non case-sensitive filesystem).
  [jensens]

- Fix tests to run on ``windows``.
  [jensens]

- Add Github Actions testrunners for ``ubuntu``, ``windows``.
  [jensens]

- Run tests with Zope 4.5.
  [jensens]

- Breaking: Add and test/support for Python 3.8. Drop support for Python 3.5.
  [jensens]


0.8 (2018-11-07)
----------------

- Added support for Python 3.5, 3.6, 3.7; dropped support for 2.6.
  [ale-rt, pbauer]

- Fix: Be sure ignored templates will reread from disk.
  [ale-rt]

- Standardize namespace __init__

- Fix issue where zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile
  was not using jbot overrides.
  [davisagli]

0.7.1 (2012-01-09)
------------------

- Fixed an issue where multiple registrations against the same layer
  would cause only one registration (decided randomly) to have effect.

  The lookup code now uses the specification resolution order to query
  for override registrations in order of specialization.
  [malthe]

0.7 (2012-01-05)
----------------

- Fixed issue where templates being patched by ``five.pt`` would not
  get properly jbotted.

- Use ``five.pt`` if available. [malthe]

- Fixed an issue where tests would fail on Zope 2.10. [malthe]

0.6.3 (2010-09-07)
------------------

- Fixed compatibility with Plone 3.x. [malthe]

0.6.2 (2010-02-17)
------------------

- Downgrade log messages to debug level. In normal operation they don't contain
  any valuable information. [hannosch]

- Prefer zope.site over zope.app.component if it is available. [hannosch]

0.6.1 (2010-02-09)
------------------

- Fix bungled release [optilude]

0.6.0 (2010-02-09)
------------------

- Zope 2.12 compatibility. [malthe]

- Added support for automatic configuration. [malthe]

- Fixed layer specialization ordering. [malthe]

0.5.3 (2009-10-31)
------------------

- ZCML-directive is now called ``jbot``. [malthe]

0.5.2 (2009-10-23)
------------------

- Fixed issue where an exception would be raised if a view was not an
  acquirer, while the context was. [gweis]

0.5.1 (2009-10-19)
------------------

- Acquisition-wrap template instance, if applicable. This fixes an
  issue on Zope 2.10 where legacy code would break.

0.5 (2009-10-16)
----------------

- Added support for CMF skin objects.

0.4 (2009-10-15)
----------------

- Added Chameleon-support.

- Reimplemented override logic; the total usage cost is now reduced to
  an insignificant amount. Meanwhile, only templates that are defined
  as class-attributes (e.g. on views, viewlets and portlets) can be
  overriden.

0.3 (2009-09-26)
----------------

- Improved test coverage.

- Refactored code, improving performance.

- Fixed issue with multiple layers.

0.2 (2008-07-14)
----------------

- Added layer support.

0.1 (2007-11-27)
----------------

- Initial public release.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zopefoundation/z3c.jbot",
    "name": "z3c.jbot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "page template override",
    "author": "Zope Foundation and Contributors",
    "author_email": "zope-dev@zope.dev",
    "download_url": "https://files.pythonhosted.org/packages/17/03/df8ff6c7f53c9e9af6d181b9781ee22804f921544a79f7bf66f552e9385f/z3c.jbot-2.0.tar.gz",
    "platform": null,
    "description": "Overview\n========\n\nThe ``z3c.jbot`` (or \"Just a bunch of templates\") package allows easy\ncustomization of existing templates and images. It works on Zope 2 and\nZope 3.\n\nThe Chameleon rendering engine is supported [#]_.\n\nUse of this package adds a small (2-3 ms per request on Plone) to the\ntotal application response time.\n\n.. [#] To enable Chameleon on Zope 2, use the ``five.pt`` package (CMF-apps like Plone should use ``cmf.pt`` which adds full support).\n\nUsage\n-----\n\nTo override a particular file, first determine its *canonical\nfilename*. It's defined as the path relative to the package within\nwhich the file is located; directory separators are replaced with\ndots.\n\nExample:\n\n  Suppose you want to override: /plone/app/layout/viewlets/logo.pt\n\n  You would use the filename:   plone.app.layout.viewlets.logo.pt\n\nSimply drop the file in a directory and register that directory for\nuse with jbot using a ZCML-directive::\n\n  <include package=\"z3c.jbot\" file=\"meta.zcml\" />\n\n  <browser:jbot\n      directory=\"<path>\"\n      layer=\"<layer>\" />\n\nTemplates in views, viewlets and portlets\n-----------------------------------------\n\nAny template that is defined as a class-attribute can be overriden\nusing jbot, e.g. those used in views, viewlets and portlets. The\ntemplate overrides may be registered for any request layer or only a\nspecific layer.\n\nCMF objects\n-----------\n\nAny skin-object (e.g. images, templates) on the file system (directory\nviews) can be overridden.\n\nPlone resources\n---------------\n\nIf `plone.resource` is installed, it's possible to use jbot to\noverride filesystem resources.\n\nAuthor\n------\n\nMalthe Borch <mborch@gmail.com>\n\nChanges\n=======\n\n2.0 (2023-05-04)\n----------------\n\n- Add support for Python 3.9, 3.10, 3.11.\n\n- Drop support for Python 2.7, 3.5, 3.6.\n\n\n1.1.1 (2021-08-18)\n------------------\n\n- Fix error in find_zope2_product: \"TypeError: expected str, bytes or os.PathLike object, not list\".\n  [jensens]\n\n\n1.1.0 (2020-09-20)\n------------------\n\n- Added support for static resource registered using the \"static\"\n  directive of `plone.resource`.\n  [malthe]\n\n\n1.0.0 (2020-08-25)\n------------------\n\n- Breaking: Remove long deprecated backward compatibility imports of getSite and setHooks.\n  [jensens]\n\n- Fix #8:  Broken on Windows (non case-sensitive filesystem).\n  [jensens]\n\n- Fix tests to run on ``windows``.\n  [jensens]\n\n- Add Github Actions testrunners for ``ubuntu``, ``windows``.\n  [jensens]\n\n- Run tests with Zope 4.5.\n  [jensens]\n\n- Breaking: Add and test/support for Python 3.8. Drop support for Python 3.5.\n  [jensens]\n\n\n0.8 (2018-11-07)\n----------------\n\n- Added support for Python 3.5, 3.6, 3.7; dropped support for 2.6.\n  [ale-rt, pbauer]\n\n- Fix: Be sure ignored templates will reread from disk.\n  [ale-rt]\n\n- Standardize namespace __init__\n\n- Fix issue where zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile\n  was not using jbot overrides.\n  [davisagli]\n\n0.7.1 (2012-01-09)\n------------------\n\n- Fixed an issue where multiple registrations against the same layer\n  would cause only one registration (decided randomly) to have effect.\n\n  The lookup code now uses the specification resolution order to query\n  for override registrations in order of specialization.\n  [malthe]\n\n0.7 (2012-01-05)\n----------------\n\n- Fixed issue where templates being patched by ``five.pt`` would not\n  get properly jbotted.\n\n- Use ``five.pt`` if available. [malthe]\n\n- Fixed an issue where tests would fail on Zope 2.10. [malthe]\n\n0.6.3 (2010-09-07)\n------------------\n\n- Fixed compatibility with Plone 3.x. [malthe]\n\n0.6.2 (2010-02-17)\n------------------\n\n- Downgrade log messages to debug level. In normal operation they don't contain\n  any valuable information. [hannosch]\n\n- Prefer zope.site over zope.app.component if it is available. [hannosch]\n\n0.6.1 (2010-02-09)\n------------------\n\n- Fix bungled release [optilude]\n\n0.6.0 (2010-02-09)\n------------------\n\n- Zope 2.12 compatibility. [malthe]\n\n- Added support for automatic configuration. [malthe]\n\n- Fixed layer specialization ordering. [malthe]\n\n0.5.3 (2009-10-31)\n------------------\n\n- ZCML-directive is now called ``jbot``. [malthe]\n\n0.5.2 (2009-10-23)\n------------------\n\n- Fixed issue where an exception would be raised if a view was not an\n  acquirer, while the context was. [gweis]\n\n0.5.1 (2009-10-19)\n------------------\n\n- Acquisition-wrap template instance, if applicable. This fixes an\n  issue on Zope 2.10 where legacy code would break.\n\n0.5 (2009-10-16)\n----------------\n\n- Added support for CMF skin objects.\n\n0.4 (2009-10-15)\n----------------\n\n- Added Chameleon-support.\n\n- Reimplemented override logic; the total usage cost is now reduced to\n  an insignificant amount. Meanwhile, only templates that are defined\n  as class-attributes (e.g. on views, viewlets and portlets) can be\n  overriden.\n\n0.3 (2009-09-26)\n----------------\n\n- Improved test coverage.\n\n- Refactored code, improving performance.\n\n- Fixed issue with multiple layers.\n\n0.2 (2008-07-14)\n----------------\n\n- Added layer support.\n\n0.1 (2007-11-27)\n----------------\n\n- Initial public release.\n",
    "bugtrack_url": null,
    "license": "ZPL 2.1",
    "summary": "Drop-in template overrides.",
    "version": "2.0",
    "project_urls": {
        "Homepage": "https://github.com/zopefoundation/z3c.jbot"
    },
    "split_keywords": [
        "page",
        "template",
        "override"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "36282640b58eb43974fef16dab064982cd25baece30c0a8d4589498f4bad60a4",
                "md5": "246a2907e7189ad6e968d65a3569a359",
                "sha256": "ee7e0d70d7fcbf46b85a126c389c5a0f5dc1d37d9e70052e95fcbac4dd8c7c49"
            },
            "downloads": -1,
            "filename": "z3c.jbot-2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "246a2907e7189ad6e968d65a3569a359",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 18264,
            "upload_time": "2023-05-04T14:37:54",
            "upload_time_iso_8601": "2023-05-04T14:37:54.631484Z",
            "url": "https://files.pythonhosted.org/packages/36/28/2640b58eb43974fef16dab064982cd25baece30c0a8d4589498f4bad60a4/z3c.jbot-2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1703df8ff6c7f53c9e9af6d181b9781ee22804f921544a79f7bf66f552e9385f",
                "md5": "6acb9f56e7da82b8b85b31cbb7f59f0a",
                "sha256": "36531576fcf19e6fefaec22714430d750f65ff39c4ebc3cdb1c62c1b23bec23b"
            },
            "downloads": -1,
            "filename": "z3c.jbot-2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6acb9f56e7da82b8b85b31cbb7f59f0a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 17159,
            "upload_time": "2023-05-04T14:37:56",
            "upload_time_iso_8601": "2023-05-04T14:37:56.588182Z",
            "url": "https://files.pythonhosted.org/packages/17/03/df8ff6c7f53c9e9af6d181b9781ee22804f921544a79f7bf66f552e9385f/z3c.jbot-2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-04 14:37:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zopefoundation",
    "github_project": "z3c.jbot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "z3c.jbot"
}
        
Elapsed time: 0.13830s