{ "info": { "author": "Zope Foundation and Contributors", "author_email": "zope-dev@zope.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Zope :: 3", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP" ], "description": "This package provides a pagelet based layer setup for Zope3.\n\n\n.. contents::\n\n==============================\nPagelet-based Layer for Zope 3\n==============================\n\nThis package contains the pagelet layer. This layer supports a correct set of\ncomponent registration and can be used for inheritation in custom skins.\n\nRight now the default implementation in Zope3 has different restriction in the\ntraversal concept and use to much registration on the default layer.\n\nImportant\n---------\n\nThis layer ia based on the pagelet pattern. This means every page e.g. the\nerror page is based on the pagelet concept.\n\n\n``IPageletBrowserLayer`` Layer\n------------------------------\n\nThe pagelet layer is useful for build custom presentation skins without access\nto ZMI menus like ``zmi_views`` etc. This means there is no menu item\nregistred if you use this layer.\n\nThis layer is *NOT* derived from ``IDefaultBrowserLayer`` layer. Therefore it\nprovides only a minimal set of the most important public views such as\n``@@absolute_url`` which get registered in zope packages for the IHTTPRequest\nand IBrowserRequest. Next to this views, this package will only provide error\nviews and traversers which are normaly regsitered in the following zope\npackages:\n\n- ``zope.app.http.exception``\n- ``zope.app.publication``\n- ``zope.browserresource``\n- ``zope.traversing``\n\nNote, this package does not depend on all the packages described above. We only\nneed to depend on the same interfaces where this package will define views and\ntraversers for.\n\n\nTesting\n-------\n\nFor testing the ``IPageletBrowserLayer`` layer we use the testing skin defined\nin the tests package which uses the ``IPageletBrowserLayer`` layer as the only\nbase layer. This means, that our testing skin provides only the views defined\nin the minimal package and it's testing views defined in tests.\n\nLogin as manager first:\n\n >>> from webtest.app import TestApp\n >>> manager = TestApp(\n ... make_wsgi_app(), extra_environ={\n ... 'wsgi.handleErrors': False,\n ... 'HTTP_AUTHORIZATION': 'Basic mgr:mgrpw'})\n\nCheck if we can access the ``page.html`` view which is registred in the\n``ftesting.zcml`` file with our skin:\n\n >>> skinURL = 'http://localhost/++skin++PageletTestSkin'\n >>> res = manager.get(skinURL + '/page.html')\n >>> res.request.url\n 'http://localhost/++skin++PageletTestSkin/page.html'\n\n >>> print(res.html)\n \n
\n