Commit 15d406e1 authored by Philipp von Weitershausen's avatar Philipp von Weitershausen

Merge r40243 from 2.9 branch:

  Update included Five to version 1.3b3.  See Products/Five/CHANGES.txt for more info.
parents eed92172 3385826d
......@@ -2,16 +2,33 @@
Five Changes
============
Five 1.3b3 (2005-11-19)
=======================
This version is also included in Zope 2.9b1.
Bugfixes
--------
* Made the creation of custom skins work again. It was broken in the
port to Zope 3.2.
Five 1.3b2 (2005-11-10)
=======================
This version is included in Zope 2 trunk as of this date.
Changes compared to Five 1.3b:
Bugfixes
--------
* Fixed bug that broke WebDAV access for five:defaultViewable objects. The
__browser_default__ now modifies only GET and POST requests.
* Fixed some event recursion compatibility modes.
Five 1.3b (2005-11-02)
======================
This version is also included in Zope 2.9b1.
Restructuring
-------------
......
How to install Five
-------------------
===================
Requirements for Five 1.3
=========================
-------------------------
* Zope 2.9+ with Python 2.4.1+
......@@ -10,8 +10,29 @@ Note that Five 1.3 is already part of Zope 2.9. You can still install
a newer Five version in your instance, if you like. It will override
the Five product inside the Zope tree.
Compatability matrix
--------------------
The following table shows which Five version can and should be used
with which Zope 2 and Zope 3 versions.
============ ======================= =========== ========
. Zope 2.7 Zope 2.8 Zope 2.9
------------ ----------------------- ----------- --------
. Zope X3 3.0 (not incl.) Zope X3 3.0 Zope 3.2
============ ======================= =========== ========
Five 1.0 X included
Five 1.1[#]_ X X
Five 1.2 X
Five 1.3 included
============ ======================= =========== ========
.. [#] This branch is no longer actively maintained.
Running the tests
=================
-----------------
For information on how to install the automatic Five tests, please see
``tests/README.txt``.
......@@ -3,6 +3,28 @@
<browser:defaultView name="index.html" />
<interface
interface="zope.publisher.interfaces.browser.ILayer"
/>
<interface
interface="zope.publisher.interfaces.browser.ISkin"
/>
<interface
interface="zope.app.publisher.interfaces.browser.IMenuItemType"
/>
<browser:layer
name="default"
interface="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
/>
<defaultLayer
type="zope.publisher.interfaces.browser.IBrowserRequest"
layer="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
/>
<browser:page
for="*"
name="absolute_url"
......
Test layer and skin support
===========================
Let's register a test layer and test skin:
>>> import Products.Five.browser.tests
>>> from Products.Five import zcml
>>> zcml.load_config("configure.zcml", Products.Five)
>>> zcml.load_config("skin.zcml", package=Products.Five.browser.tests)
Let's add a test object that we'll access the test page from:
>>> from Products.Five.tests.testing.simplecontent import manage_addSimpleContent
>>> manage_addSimpleContent(self.folder, 'testoid', 'Testoid')
The view was registered on a different layer than 'default', that's
why we can't access it straight away:
>>> print http(r"""
... GET /test_folder_1_/testoid/eagle.html HTTP/1.1
... """)
HTTP/1.1 404 Not Found
...
It works when we explicitly use the skin that includes that layer:
>>> print http(r"""
... GET /test_folder_1_/testoid/++skin++TestSkin/eagle.html HTTP/1.1
... """)
HTTP/1.1 200 OK
...
The eagle has landed
Or when we make that skin the default skin:
>>> zcml.load_string('''
... <browser:defaultSkin
... xmlns:browser="http://namespaces.zope.org/browser"
... name="TestSkin" />
... ''')
>>> print http(r"""
... GET /test_folder_1_/testoid/eagle.html HTTP/1.1
... """)
HTTP/1.1 200 OK
...
The eagle has landed
Clean up
--------
>>> from zope.app.testing.placelesssetup import tearDown
>>> tearDown()
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:meta="http://namespaces.zope.org/meta"
xmlns:browser="http://namespaces.zope.org/browser">
<!-- make the zope2.Public permission work -->
<meta:redefinePermission from="zope2.Public" to="zope.Public" />
<browser:layer name="test" />
<browser:skin
name="TestSkin"
layers="test default"
/>
<browser:page
for="Products.Five.tests.testing.simplecontent.ISimpleContent"
class=".pages.SimpleView"
attribute="eagle"
name="eagle.html"
permission="zope2.Public"
layer="test"
/>
</configure>
##############################################################################
#
# Copyright (c) 2005 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test browser pages
$Id$
"""
import os, sys
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
def test_suite():
from Testing.ZopeTestCase import FunctionalDocFileSuite
return FunctionalDocFileSuite('skin.txt',
package='Products.Five.browser.tests')
if __name__ == '__main__':
framework()
......@@ -79,6 +79,12 @@
handler="zope.app.schema.metaconfigure.vocabulary"
/>
<meta:directive
name="defaultLayer"
schema="zope.app.component.metadirectives.IDefaultLayerDirective"
handler="zope.app.component.metaconfigure.defaultLayer"
/>
</meta:directives>
<meta:directives namespace="http://namespaces.zope.org/five">
......
......@@ -41,13 +41,13 @@ def load_site():
_context = xmlconfig.file(file)
def load_config(file, package=None):
def load_config(file, package=None, execute=True):
"""Load an additional ZCML file into the context.
Use with extreme care.
"""
global _context
_context = xmlconfig.file(file, package, _context)
_context = xmlconfig.file(file, package, _context, execute=execute)
def load_string(s):
"""Load a snipped of ZCML into the context.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment