plone.browserlayer


Nameplone.browserlayer JSON
Version 3.0.2 PyPI version JSON
download
home_pagehttps://github.com/plone/plone.browserlayer
SummaryBrowser layer management for Zope applications
upload_time2023-10-06 22:31:38
maintainer
docs_urlNone
authorPlone Foundation
requires_python>=3.8
licenseGPL version 2
keywords plone browser layer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

This package aims to make it easier to register visual components (e.g. views
and viewlets) so that they only show up in a Plone site where they have been
explicitly installed.

Basic usage
-----------

To use this feature, you should:

- declare plone.browserlayer as a dependency, e.g. in setup.py::

   install_requires=[
         'plone.browserlayer',
     ],

- ensure that its ZCML is loaded, e.g. with an include from your own package::

   <include package="plone.browserlayer" />

- create a layer marker interface unique to your product::

   from zope.interface import Interface
   class IMyProductLayer(Interface):
       """A layer specific to my product
       """

- register this with GenericSetup, in a browserlayer.xml file::

   <layers>
       <layer name="my.product"
              interface="my.product.interfaces.IMyProductLayer" />
   </layers>

- register visual components in ZCML for this layer, e.g.::

   <browser:page
       name="my-view"
       for="*"
       layer=".interfaces.IMyProductLayer"
       permission="zope.Public"
       template="my-view.pt"
       />

Changelog
=========

.. You should *NOT* be adding new change log entries to this file.
   You should create a file in the news directory instead.
   For helpful instructions, please see:
   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst

.. towncrier release notes start

3.0.2 (2023-10-07)
------------------

Internal:


- Update configuration files.
  [plone devs] (cfffba8c)


3.0.1 (2023-03-14)
------------------

Internal:


- Update configuration files.
  [plone devs] (ba6bcc29)


3.0.0 (2022-11-14)
------------------

Breaking changes:


- Drop support for Plone 5 and Python 2.  [maurits] (#600)


Bug fixes:


- Fix 'KeyError: file' in browser tests on Python 3.11.
  [maurits] (#3663)


2.2.4 (2020-09-07)
------------------

Bug fixes:


- Fixed deprecation warning for ``zope.component.interfaces.IComponentRegistry``.
  [maurits] (#3130)


2.2.3 (2020-04-20)
------------------

Bug fixes:


- Minor packaging updates. (#1)


2.2.2 (2018-09-28)
------------------

Bug fixes:

- Fix tests for py3
  [pbauer]


2.2.1 (2018-02-02)
------------------

Bug fixes:

- Add Python 2 / 3 compatibility
  [pbauer]


2.2.0 (2017-02-12)
------------------

Bug fixes:

- Fixed test when using Zope 4.  [maurits]


2.1.7 (2016-11-01)
------------------

Fixes:

- Removed ZopeTestCase.  We were importing from it but not using it...
  [ivanteoh, maurits]


2.1.6 (2015-10-27)
------------------

Fixes:

- Minor cleanup in order to follow plone code style conventions.
  [jensens]


2.1.5 (2015-04-29)
------------------

- Rerelease for clarity, because 2.1.4 got released twice.
  [maurits]


2.1.4 (2015-04-29)
------------------

- Move tests to plone.app.testing.
  [sdelcourt,timo]


2.1.3 (2014-02-25)
------------------

- Fix tests with diazo.
  [davisagli]


2.1.2 (2012-10-03)
------------------

- Add support for calling many times remove in export (ie:even when no corresponding layer is registered, remove option should not throw exception).
  [toutpt]

2.1.1 (2011-11-24)
------------------

- Added uninstall support to browserlayer.xml with the 'remove' option.
  [maurits]

- GS export xml is now repeatable. Before two consecutive exports could
  yield differently ordered results.
  [do3cc]


2.1 - 2011-05-12
----------------

- Update import of BeforeTraverseEvent to come from zope.traversing instead
  of zope.app.publication.
  [davisagli]

- Add MANIFEST.in
  [WouterVH]


2.0.1 - 2010-09-21
------------------

- Make sure the layers don't get applied twice if the site is traversed more
  than once (such as in a vhosting URL).
  [davisagli]


2.0 - 2010-07-18
----------------

- Update license to GPL version 2 only.
  [hannosch]

- Package metadata cleanup, require Zope2 distribution.
  [hannosch]


1.0.1 - 2009-09-09
------------------

- Be more robust against broken layer registrations. These can occur when
  packages with registered layers are removed.
  [wichert]

- Clarified license and copyright.
  [hannosch]

- Register ourselves for the more generic ISiteRoot from CMFCore and not
  IPloneSiteRoot.
  [hannosch]

- Declare test dependencies in an extra.
  [hannosch]

- Specify package dependencies.
  [hannosch]


1.0.0 - 2008-04-20
------------------

- Unchanged from 1.0rc4


1.0rc4 - 2008-04-13
-------------------

- Register the GenericSetup import and export steps using zcml. This means you
  will no longer need to install this package manually.
  [wichert]


1.0rc3 - 2008-03-09
-------------------

- Include README.txt and HISTORY.txt in the package's long description.
  [wichert]

- Add metadata.xml to the GenericSetup profile. This fixes a deprecation
  warning for Plone 3.1 and later.
  [wichert]


1.0b1 - 2007-09-23
------------------

- Initial package structure.
  [zopeskel]

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/plone/plone.browserlayer",
    "name": "plone.browserlayer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "plone browser layer",
    "author": "Plone Foundation",
    "author_email": "plone-developers@lists.sourceforge.net",
    "download_url": "https://files.pythonhosted.org/packages/41/34/88e5abd6f2ec01b8428e4e851180add22467498325b7f47b82d849b1f85f/plone.browserlayer-3.0.2.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\nThis package aims to make it easier to register visual components (e.g. views\nand viewlets) so that they only show up in a Plone site where they have been\nexplicitly installed.\n\nBasic usage\n-----------\n\nTo use this feature, you should:\n\n- declare plone.browserlayer as a dependency, e.g. in setup.py::\n\n   install_requires=[\n         'plone.browserlayer',\n     ],\n\n- ensure that its ZCML is loaded, e.g. with an include from your own package::\n\n   <include package=\"plone.browserlayer\" />\n\n- create a layer marker interface unique to your product::\n\n   from zope.interface import Interface\n   class IMyProductLayer(Interface):\n       \"\"\"A layer specific to my product\n       \"\"\"\n\n- register this with GenericSetup, in a browserlayer.xml file::\n\n   <layers>\n       <layer name=\"my.product\"\n              interface=\"my.product.interfaces.IMyProductLayer\" />\n   </layers>\n\n- register visual components in ZCML for this layer, e.g.::\n\n   <browser:page\n       name=\"my-view\"\n       for=\"*\"\n       layer=\".interfaces.IMyProductLayer\"\n       permission=\"zope.Public\"\n       template=\"my-view.pt\"\n       />\n\nChangelog\n=========\n\n.. You should *NOT* be adding new change log entries to this file.\n   You should create a file in the news directory instead.\n   For helpful instructions, please see:\n   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst\n\n.. towncrier release notes start\n\n3.0.2 (2023-10-07)\n------------------\n\nInternal:\n\n\n- Update configuration files.\n  [plone devs] (cfffba8c)\n\n\n3.0.1 (2023-03-14)\n------------------\n\nInternal:\n\n\n- Update configuration files.\n  [plone devs] (ba6bcc29)\n\n\n3.0.0 (2022-11-14)\n------------------\n\nBreaking changes:\n\n\n- Drop support for Plone 5 and Python 2.  [maurits] (#600)\n\n\nBug fixes:\n\n\n- Fix 'KeyError: file' in browser tests on Python 3.11.\n  [maurits] (#3663)\n\n\n2.2.4 (2020-09-07)\n------------------\n\nBug fixes:\n\n\n- Fixed deprecation warning for ``zope.component.interfaces.IComponentRegistry``.\n  [maurits] (#3130)\n\n\n2.2.3 (2020-04-20)\n------------------\n\nBug fixes:\n\n\n- Minor packaging updates. (#1)\n\n\n2.2.2 (2018-09-28)\n------------------\n\nBug fixes:\n\n- Fix tests for py3\n  [pbauer]\n\n\n2.2.1 (2018-02-02)\n------------------\n\nBug fixes:\n\n- Add Python 2 / 3 compatibility\n  [pbauer]\n\n\n2.2.0 (2017-02-12)\n------------------\n\nBug fixes:\n\n- Fixed test when using Zope 4.  [maurits]\n\n\n2.1.7 (2016-11-01)\n------------------\n\nFixes:\n\n- Removed ZopeTestCase.  We were importing from it but not using it...\n  [ivanteoh, maurits]\n\n\n2.1.6 (2015-10-27)\n------------------\n\nFixes:\n\n- Minor cleanup in order to follow plone code style conventions.\n  [jensens]\n\n\n2.1.5 (2015-04-29)\n------------------\n\n- Rerelease for clarity, because 2.1.4 got released twice.\n  [maurits]\n\n\n2.1.4 (2015-04-29)\n------------------\n\n- Move tests to plone.app.testing.\n  [sdelcourt,timo]\n\n\n2.1.3 (2014-02-25)\n------------------\n\n- Fix tests with diazo.\n  [davisagli]\n\n\n2.1.2 (2012-10-03)\n------------------\n\n- Add support for calling many times remove in export (ie:even when no corresponding layer is registered, remove option should not throw exception).\n  [toutpt]\n\n2.1.1 (2011-11-24)\n------------------\n\n- Added uninstall support to browserlayer.xml with the 'remove' option.\n  [maurits]\n\n- GS export xml is now repeatable. Before two consecutive exports could\n  yield differently ordered results.\n  [do3cc]\n\n\n2.1 - 2011-05-12\n----------------\n\n- Update import of BeforeTraverseEvent to come from zope.traversing instead\n  of zope.app.publication.\n  [davisagli]\n\n- Add MANIFEST.in\n  [WouterVH]\n\n\n2.0.1 - 2010-09-21\n------------------\n\n- Make sure the layers don't get applied twice if the site is traversed more\n  than once (such as in a vhosting URL).\n  [davisagli]\n\n\n2.0 - 2010-07-18\n----------------\n\n- Update license to GPL version 2 only.\n  [hannosch]\n\n- Package metadata cleanup, require Zope2 distribution.\n  [hannosch]\n\n\n1.0.1 - 2009-09-09\n------------------\n\n- Be more robust against broken layer registrations. These can occur when\n  packages with registered layers are removed.\n  [wichert]\n\n- Clarified license and copyright.\n  [hannosch]\n\n- Register ourselves for the more generic ISiteRoot from CMFCore and not\n  IPloneSiteRoot.\n  [hannosch]\n\n- Declare test dependencies in an extra.\n  [hannosch]\n\n- Specify package dependencies.\n  [hannosch]\n\n\n1.0.0 - 2008-04-20\n------------------\n\n- Unchanged from 1.0rc4\n\n\n1.0rc4 - 2008-04-13\n-------------------\n\n- Register the GenericSetup import and export steps using zcml. This means you\n  will no longer need to install this package manually.\n  [wichert]\n\n\n1.0rc3 - 2008-03-09\n-------------------\n\n- Include README.txt and HISTORY.txt in the package's long description.\n  [wichert]\n\n- Add metadata.xml to the GenericSetup profile. This fixes a deprecation\n  warning for Plone 3.1 and later.\n  [wichert]\n\n\n1.0b1 - 2007-09-23\n------------------\n\n- Initial package structure.\n  [zopeskel]\n",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "Browser layer management for Zope applications",
    "version": "3.0.2",
    "project_urls": {
        "Homepage": "https://github.com/plone/plone.browserlayer"
    },
    "split_keywords": [
        "plone",
        "browser",
        "layer"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1dfc20955d87e6aaed6a3839bdc69101823d36460bb74a7195e080fcd95e1f07",
                "md5": "ceedbb758ad3f2d918caa8b8f45406a1",
                "sha256": "3576962f1a4f35777438e9c3ef6b584890728a1a3a1684041ff3c1fbf6699a26"
            },
            "downloads": -1,
            "filename": "plone.browserlayer-3.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ceedbb758ad3f2d918caa8b8f45406a1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12924,
            "upload_time": "2023-10-06T22:31:37",
            "upload_time_iso_8601": "2023-10-06T22:31:37.261688Z",
            "url": "https://files.pythonhosted.org/packages/1d/fc/20955d87e6aaed6a3839bdc69101823d36460bb74a7195e080fcd95e1f07/plone.browserlayer-3.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "413488e5abd6f2ec01b8428e4e851180add22467498325b7f47b82d849b1f85f",
                "md5": "feb1e9f27360bd750b38146dffff4a40",
                "sha256": "3862c370939d0b978c756d8a2ef32570acbbe86254011332cabc8b6aa6cb6c1d"
            },
            "downloads": -1,
            "filename": "plone.browserlayer-3.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "feb1e9f27360bd750b38146dffff4a40",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17755,
            "upload_time": "2023-10-06T22:31:38",
            "upload_time_iso_8601": "2023-10-06T22:31:38.804347Z",
            "url": "https://files.pythonhosted.org/packages/41/34/88e5abd6f2ec01b8428e4e851180add22467498325b7f47b82d849b1f85f/plone.browserlayer-3.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-06 22:31:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "plone",
    "github_project": "plone.browserlayer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "plone.browserlayer"
}
        
Elapsed time: 0.12543s