[Checkins] SVN: z3ext.layout/tags/1.6.0/ release tag
Nikolay Kim
fafhrd at datacom.kz
Wed Nov 26 12:33:45 EST 2008
Log message for revision 93370:
release tag
Changed:
A z3ext.layout/tags/1.6.0/
D z3ext.layout/tags/1.6.0/CHANGES.txt
A z3ext.layout/tags/1.6.0/CHANGES.txt
D z3ext.layout/tags/1.6.0/setup.py
A z3ext.layout/tags/1.6.0/setup.py
D z3ext.layout/tags/1.6.0/src/z3ext/layout/configure.zcml
A z3ext.layout/tags/1.6.0/src/z3ext/layout/configure.zcml
D z3ext.layout/tags/1.6.0/src/z3ext/layout/interfaces.py
A z3ext.layout/tags/1.6.0/src/z3ext/layout/interfaces.py
D z3ext.layout/tags/1.6.0/src/z3ext/layout/zcml.py
A z3ext.layout/tags/1.6.0/src/z3ext/layout/zcml.py
-=-
Deleted: z3ext.layout/tags/1.6.0/CHANGES.txt
===================================================================
--- z3ext.layout/trunk/CHANGES.txt 2008-11-26 10:04:12 UTC (rev 93368)
+++ z3ext.layout/tags/1.6.0/CHANGES.txt 2008-11-26 17:33:45 UTC (rev 93370)
@@ -1,178 +0,0 @@
-=======
-CHANGES
-=======
-
-1.5.9 (2008-11-24)
-------------------
-
-- Fixed python2.4 compatibility
-
-
-1.5.7 (2008-11-17)
-------------------
-
-- Update css styles
-
-
-1.5.6 (2008-11-06)
-------------------
-
-- Register nameless pagelet only if provided interface is not
-inherited from IBrowserPublisher
-
-
-1.5.5 (2008-11-05)
-------------------
-
-- Add IPagelet interface to pagelet provides
-
-
-1.5.4 (2008-10-30)
-------------------
-
-- Added 'pagelet' tales expression (same as @@pagelet)
-
-- Update css styles
-
-
-1.5.3 (2008-10-16)
-------------------
-
-- Update css styles
-
-
-1.5.2 (2008-10-15)
-------------------
-
-- Render IPagelet adapter for @@pagelet view
-
-
-1.5.1 (2008-10-14)
-------------------
-
-- Fixed missing NotFount in @@pagelet
-
-- Log errors in @@pagelet
-
-- Default css styles
-
-
-1.5.0 (2008-10-06)
-------------------
-
-- Added @@pagelet browser view for fast access pagelets
-
-
-1.4.6 (2008-10-03)
-------------------
-
-- Fixed bug with multple nameless pagelet
-
-
-1.4.5 (2008-08-18)
-------------------
-
-- `name` attribute is optional for <z3ext:pagelet/> directive
-
-
-1.4.4 (2008-07-22)
-------------------
-
-- Fix IPagelet adapter for content
-
-
-1.4.3 (2008-05-22)
-------------------
-
-- Added LayoutNotFound exception
-
-
-1.4.2 (2008-05-14)
-------------------
-
-- Remove unused interfaces
-
-- Tests updated
-
-
-1.4.1 (2008-04-23)
-------------------
-
-- Use newer version of z3ext.autoinclude
-
-
-1.4 (2008-03-21)
-----------------
-
-- Added z3ext:pagelet directive
-
-- Code cleanup
-
-- Moved to svn.zope.org
-
-
-1.3.2 (2008-03-06)
-------------------
-
-- Removed context layouts
-
-
-1.3.1 (2008-02-21)
-------------------
-
-- Code cleanup
-
-- Remove code related to zope.formlib
-
-
-1.3.0 (2008-02-20)
-------------------
-
-- Removed code related to z3c.form
-
-
-1.2.1 (2008-02-18)
-------------------
-
-- Added 'redirect' method to IBrowserPagelet, this is usefull
- when we need redirect during 'update' method and we don't
- need render pagelet at all.
-
-- Added adapter to IPagelet for (context, request),
- this adapter gets browser:defaultView for context and if it IPagelet return it
-
-
-1.2.0 (2008-02-13)
-------------------
-
-- Remove all code related to persistent templates
-
-
-1.1.2 (2008-02-12)
-------------------
-
-- Added 'title' and 'description' fields layout directive
-
-- check ILayoutTemplateTAL for ISite
-
-
-1.1.0 (2008-02-08)
-------------------
-
-- Added compatibility with z3c.template layouts
-
-- Added ILayoutTemplateTAL interface, other packages
- can define adapter to this interface and change layout template
- TAL program (layout customization)
-
-
-1.0.1 (2008-02-02)
-------------------
-
-- Added required dependencies
-
-
-1.0.0 (2008-01-15)
-------------------
-
-- Initial release
Copied: z3ext.layout/tags/1.6.0/CHANGES.txt (from rev 93369, z3ext.layout/trunk/CHANGES.txt)
===================================================================
--- z3ext.layout/tags/1.6.0/CHANGES.txt (rev 0)
+++ z3ext.layout/tags/1.6.0/CHANGES.txt 2008-11-26 17:33:45 UTC (rev 93370)
@@ -0,0 +1,185 @@
+=======
+CHANGES
+=======
+
+1.6.0 (2008-11-27)
+------------------
+
+- Added 'uid' attribute to z3ext:layout directive.
+ Send ILayoutCreatedEvent event only if layout has uid
+
+
+1.5.9 (2008-11-24)
+------------------
+
+- Fixed python2.4 compatibility
+
+
+1.5.7 (2008-11-17)
+------------------
+
+- Update css styles
+
+
+1.5.6 (2008-11-06)
+------------------
+
+- Register nameless pagelet only if provided interface is not
+inherited from IBrowserPublisher
+
+
+1.5.5 (2008-11-05)
+------------------
+
+- Add IPagelet interface to pagelet provides
+
+
+1.5.4 (2008-10-30)
+------------------
+
+- Added 'pagelet' tales expression (same as @@pagelet)
+
+- Update css styles
+
+
+1.5.3 (2008-10-16)
+------------------
+
+- Update css styles
+
+
+1.5.2 (2008-10-15)
+------------------
+
+- Render IPagelet adapter for @@pagelet view
+
+
+1.5.1 (2008-10-14)
+------------------
+
+- Fixed missing NotFount in @@pagelet
+
+- Log errors in @@pagelet
+
+- Default css styles
+
+
+1.5.0 (2008-10-06)
+------------------
+
+- Added @@pagelet browser view for fast access pagelets
+
+
+1.4.6 (2008-10-03)
+------------------
+
+- Fixed bug with multple nameless pagelet
+
+
+1.4.5 (2008-08-18)
+------------------
+
+- `name` attribute is optional for <z3ext:pagelet/> directive
+
+
+1.4.4 (2008-07-22)
+------------------
+
+- Fix IPagelet adapter for content
+
+
+1.4.3 (2008-05-22)
+------------------
+
+- Added LayoutNotFound exception
+
+
+1.4.2 (2008-05-14)
+------------------
+
+- Remove unused interfaces
+
+- Tests updated
+
+
+1.4.1 (2008-04-23)
+------------------
+
+- Use newer version of z3ext.autoinclude
+
+
+1.4 (2008-03-21)
+----------------
+
+- Added z3ext:pagelet directive
+
+- Code cleanup
+
+- Moved to svn.zope.org
+
+
+1.3.2 (2008-03-06)
+------------------
+
+- Removed context layouts
+
+
+1.3.1 (2008-02-21)
+------------------
+
+- Code cleanup
+
+- Remove code related to zope.formlib
+
+
+1.3.0 (2008-02-20)
+------------------
+
+- Removed code related to z3c.form
+
+
+1.2.1 (2008-02-18)
+------------------
+
+- Added 'redirect' method to IBrowserPagelet, this is usefull
+ when we need redirect during 'update' method and we don't
+ need render pagelet at all.
+
+- Added adapter to IPagelet for (context, request),
+ this adapter gets browser:defaultView for context and if it IPagelet return it
+
+
+1.2.0 (2008-02-13)
+------------------
+
+- Remove all code related to persistent templates
+
+
+1.1.2 (2008-02-12)
+------------------
+
+- Added 'title' and 'description' fields layout directive
+
+- check ILayoutTemplateTAL for ISite
+
+
+1.1.0 (2008-02-08)
+------------------
+
+- Added compatibility with z3c.template layouts
+
+- Added ILayoutTemplateTAL interface, other packages
+ can define adapter to this interface and change layout template
+ TAL program (layout customization)
+
+
+1.0.1 (2008-02-02)
+------------------
+
+- Added required dependencies
+
+
+1.0.0 (2008-01-15)
+------------------
+
+- Initial release
Deleted: z3ext.layout/tags/1.6.0/setup.py
===================================================================
--- z3ext.layout/trunk/setup.py 2008-11-26 10:04:12 UTC (rev 93368)
+++ z3ext.layout/tags/1.6.0/setup.py 2008-11-26 17:33:45 UTC (rev 93370)
@@ -1,76 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-"""Setup for z3ext.layout package
-
-$Id$
-"""
-import sys, os
-from setuptools import setup, find_packages
-
-def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-version='1.5.10dev'
-
-
-setup(name='z3ext.layout',
- version=version,
- description="A package implementing advanced Page Template patterns.",
- long_description=(
- 'Detailed Documentation\n' +
- '======================\n'
- + '\n\n' +
- read('src', 'z3ext', 'layout', 'README.txt')
- + '\n\n' +
- read('CHANGES.txt')
- ),
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Zope Public License',
- 'Programming Language :: Python',
- 'Natural Language :: English',
- 'Operating System :: OS Independent',
- 'Topic :: Internet :: WWW/HTTP',
- 'Framework :: Zope3'],
- author='Nikolay Kim',
- author_email='fafhrd91 at gmail.com',
- url='http://z3ext.net/',
- license='ZPL 2.1',
- packages=find_packages('src'),
- package_dir = {'':'src'},
- namespace_packages=['z3ext'],
- install_requires = ['setuptools',
- 'zope.event',
- 'zope.schema',
- 'zope.component',
- 'zope.interface',
- 'zope.security',
- 'zope.publisher',
- 'zope.configuration',
- 'zope.pagetemplate',
- 'zope.tales',
- 'zope.app.component',
- 'zope.app.publisher',
- 'zope.app.pagetemplate',
- 'z3c.autoinclude',
- ],
- extras_require = dict(test=['zope.app.container',
- 'zope.app.testing',
- 'zope.testing',
- ]),
- include_package_data = True,
- zip_safe = False
- )
Copied: z3ext.layout/tags/1.6.0/setup.py (from rev 93369, z3ext.layout/trunk/setup.py)
===================================================================
--- z3ext.layout/tags/1.6.0/setup.py (rev 0)
+++ z3ext.layout/tags/1.6.0/setup.py 2008-11-26 17:33:45 UTC (rev 93370)
@@ -0,0 +1,76 @@
+##############################################################################
+#
+# Copyright (c) 2007 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.
+#
+##############################################################################
+"""Setup for z3ext.layout package
+
+$Id$
+"""
+import sys, os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+version='1.6.0'
+
+
+setup(name='z3ext.layout',
+ version=version,
+ description="A package implementing advanced Page Template patterns.",
+ long_description=(
+ 'Detailed Documentation\n' +
+ '======================\n'
+ + '\n\n' +
+ read('src', 'z3ext', 'layout', 'README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ author='Nikolay Kim',
+ author_email='fafhrd91 at gmail.com',
+ url='http://z3ext.net/',
+ license='ZPL 2.1',
+ packages=find_packages('src'),
+ package_dir = {'':'src'},
+ namespace_packages=['z3ext'],
+ install_requires = ['setuptools',
+ 'zope.event',
+ 'zope.schema',
+ 'zope.component',
+ 'zope.interface',
+ 'zope.security',
+ 'zope.publisher',
+ 'zope.configuration',
+ 'zope.pagetemplate',
+ 'zope.tales',
+ 'zope.app.component',
+ 'zope.app.publisher',
+ 'zope.app.pagetemplate',
+ 'z3c.autoinclude',
+ ],
+ extras_require = dict(test=['zope.app.container',
+ 'zope.app.testing',
+ 'zope.testing',
+ ]),
+ include_package_data = True,
+ zip_safe = False
+ )
Deleted: z3ext.layout/tags/1.6.0/src/z3ext/layout/configure.zcml
===================================================================
--- z3ext.layout/trunk/src/z3ext/layout/configure.zcml 2008-11-26 10:04:12 UTC (rev 93368)
+++ z3ext.layout/tags/1.6.0/src/z3ext/layout/configure.zcml 2008-11-26 17:33:45 UTC (rev 93370)
@@ -1,75 +0,0 @@
-<configure
- xmlns="http://namespaces.zope.org/zope"
- xmlns:zcml="http://namespaces.zope.org/zcml"
- xmlns:z3ext="http://namespaces.zope.org/z3ext"
- xmlns:tales="http://namespaces.zope.org/tales"
- i18n_domain="z3ext.layout">
-
- <includeDependencies package="z3ext.layout" />
-
- <!-- adapter provides IPagelet for (context, request) -->
- <adapter factory=".pagelet.queryPagelet" />
-
- <!-- pagelet: tales expression -->
- <tales:expressiontype
- name="pagelet"
- handler=".tales.TALESPageletExpression" />
-
- <!-- @@pagelet view -->
- <adapter
- name="pagelet"
- factory=".pagelet.PageletPublisher" />
-
- <class class=".pagelet.PageletPublisher">
- <allow
- attributes="__getitem__"
- interface="zope.publisher.interfaces.browser.IBrowserPublisher" />
- </class>
-
- <!-- default layouts -->
- <z3ext:layout
- layout="viewspace"
- for="zope.app.component.interfaces.ISite"
- title="Default layout (z3ext.layout)"
- description="Default layout, registered for IDefaultBrowserLayer."
- template="layoutcontent.pt" />
-
- <z3ext:layout
- name="viewspace"
- layout="workspace"
- title="Viewspace layout (z3ext.layout)"
- description="Default viewpsace layout, registered for IDefaultBrowserLayer."
- for="zope.app.component.interfaces.ISite"
- template="layoutviewspace.pt" />
-
- <z3ext:layout
- name="workspace"
- layout="portal"
- title="Workspace layout (z3ext.layout)"
- description="Default workspace layout, registered for IDefaultBrowserLayer."
- for="zope.app.component.interfaces.ISite"
- template="layoutworkspace.pt" />
-
- <z3ext:layout
- name="portal"
- title="Portal layout (z3ext.layout)"
- description="Default portal layout, registered for IDefaultBrowserLayer"
- for="zope.app.component.interfaces.ISite"
- template="layoutportal.pt" />
-
- <!-- Registering documentation with API doc -->
- <configure
- xmlns:zcml="http://namespaces.zope.org/zcml"
- xmlns:apidoc="http://namespaces.zope.org/apidoc"
- zcml:condition="have apidoc">
-
- <apidoc:bookchapter
- id="z3ext-layout"
- title="z3ext.layout - Template Layouts"
- doc_path="README.txt"
- parent="z3ext" />
- </configure>
-
- <include file="styles.zcml" />
-
-</configure>
Copied: z3ext.layout/tags/1.6.0/src/z3ext/layout/configure.zcml (from rev 93369, z3ext.layout/trunk/src/z3ext/layout/configure.zcml)
===================================================================
--- z3ext.layout/tags/1.6.0/src/z3ext/layout/configure.zcml (rev 0)
+++ z3ext.layout/tags/1.6.0/src/z3ext/layout/configure.zcml 2008-11-26 17:33:45 UTC (rev 93370)
@@ -0,0 +1,77 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:zcml="http://namespaces.zope.org/zcml"
+ xmlns:z3ext="http://namespaces.zope.org/z3ext"
+ xmlns:tales="http://namespaces.zope.org/tales"
+ i18n_domain="z3ext.layout">
+
+ <includeDependencies package="z3ext.layout" />
+
+ <!-- adapter provides IPagelet for (context, request) -->
+ <adapter factory=".pagelet.queryPagelet" />
+
+ <!-- pagelet: tales expression -->
+ <tales:expressiontype
+ name="pagelet"
+ handler=".tales.TALESPageletExpression" />
+
+ <!-- @@pagelet view -->
+ <adapter
+ name="pagelet"
+ factory=".pagelet.PageletPublisher" />
+
+ <class class=".pagelet.PageletPublisher">
+ <allow
+ attributes="__getitem__"
+ interface="zope.publisher.interfaces.browser.IBrowserPublisher" />
+ </class>
+
+ <!-- default layouts -->
+ <z3ext:layout
+ layout="viewspace"
+ for="zope.app.component.interfaces.ISite"
+ description="Default layout, registered for IDefaultBrowserLayer."
+ template="layoutcontent.pt" />
+
+ <z3ext:layout
+ name="viewspace"
+ title="Viewspace"
+ layout="workspace"
+ uid="default.viewspace"
+ description="Default viewpsace layout, registered for IDefaultBrowserLayer."
+ for="zope.app.component.interfaces.ISite"
+ template="layoutviewspace.pt" />
+
+ <z3ext:layout
+ name="workspace"
+ layout="portal"
+ title="Workspace"
+ uid="default.workspace"
+ description="Default workspace layout, registered for IDefaultBrowserLayer."
+ for="zope.app.component.interfaces.ISite"
+ template="layoutworkspace.pt" />
+
+ <z3ext:layout
+ name="portal"
+ title="Portal"
+ uid="default.portal"
+ description="Default portal layout, registered for IDefaultBrowserLayer"
+ for="zope.app.component.interfaces.ISite"
+ template="layoutportal.pt" />
+
+ <!-- Registering documentation with API doc -->
+ <configure
+ xmlns:zcml="http://namespaces.zope.org/zcml"
+ xmlns:apidoc="http://namespaces.zope.org/apidoc"
+ zcml:condition="have apidoc">
+
+ <apidoc:bookchapter
+ id="z3ext-layout"
+ title="z3ext.layout - Template Layouts"
+ doc_path="README.txt"
+ parent="z3ext" />
+ </configure>
+
+ <include file="styles.zcml" />
+
+</configure>
Deleted: z3ext.layout/tags/1.6.0/src/z3ext/layout/interfaces.py
===================================================================
--- z3ext.layout/trunk/src/z3ext/layout/interfaces.py 2008-11-26 10:04:12 UTC (rev 93368)
+++ z3ext.layout/tags/1.6.0/src/z3ext/layout/interfaces.py 2008-11-26 17:33:45 UTC (rev 93370)
@@ -1,80 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-""" z3ext.layout interfaces
-
-$Id$
-"""
-from zope import interface
-from zope.publisher.interfaces.browser import IBrowserPage
-
-
-class LayoutNotFound(LookupError):
- """ Layout not found exception """
-
-
-class IPagelet(IBrowserPage):
- """ pagelet """
-
- isRedirected = interface.Attribute('is redirected')
-
- def redirect(url=''):
- """Redirect URL, if `update` method needs redirect,
- it should call `redirect` method, __call__ method should
- check isRendered before render or layout."""
-
- def update():
- """Update the pagelet data."""
-
- def render():
- """Render the pagelet content w/o o-wrap."""
-
-
-class IPageletType(interface.interfaces.IInterface):
- """ pagelet interface type """
-
-
-class ILayout(IBrowserPage):
- """ layout """
-
- title = interface.Attribute('Layout title')
-
- description = interface.Attribute('Layout description')
-
- template = interface.Attribute('Layout template')
-
- def update():
- """Update the layout data """
-
- def render():
- """Render the layout """
-
-
-class ILayoutTemplateFile(interface.Interface):
- """ layout template file """
-
-
-class ILayoutCreatedEvent(interface.Interface):
- """ notification about new layout """
-
- name = interface.Attribute('Name')
-
- view = interface.Attribute('View')
-
- context = interface.Attribute('Context')
-
- layer = interface.Attribute('Layer')
-
- layoutclass = interface.Attribute('Generated class for layout')
-
- keywords = interface.Attribute('Keywords')
Copied: z3ext.layout/tags/1.6.0/src/z3ext/layout/interfaces.py (from rev 93369, z3ext.layout/trunk/src/z3ext/layout/interfaces.py)
===================================================================
--- z3ext.layout/tags/1.6.0/src/z3ext/layout/interfaces.py (rev 0)
+++ z3ext.layout/tags/1.6.0/src/z3ext/layout/interfaces.py 2008-11-26 17:33:45 UTC (rev 93370)
@@ -0,0 +1,82 @@
+##############################################################################
+#
+# Copyright (c) 2007 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.
+#
+##############################################################################
+""" z3ext.layout interfaces
+
+$Id$
+"""
+from zope import interface
+from zope.publisher.interfaces.browser import IBrowserPage
+
+
+class LayoutNotFound(LookupError):
+ """ Layout not found exception """
+
+
+class IPagelet(IBrowserPage):
+ """ pagelet """
+
+ isRedirected = interface.Attribute('is redirected')
+
+ def redirect(url=''):
+ """Redirect URL, if `update` method needs redirect,
+ it should call `redirect` method, __call__ method should
+ check isRendered before render or layout."""
+
+ def update():
+ """Update the pagelet data."""
+
+ def render():
+ """Render the pagelet content w/o o-wrap."""
+
+
+class IPageletType(interface.interfaces.IInterface):
+ """ pagelet interface type """
+
+
+class ILayout(IBrowserPage):
+ """ layout """
+
+ title = interface.Attribute('Layout title')
+
+ description = interface.Attribute('Layout description')
+
+ template = interface.Attribute('Layout template')
+
+ def update():
+ """Update the layout data """
+
+ def render():
+ """Render the layout """
+
+
+class ILayoutTemplateFile(interface.Interface):
+ """ layout template file """
+
+
+class ILayoutCreatedEvent(interface.Interface):
+ """ notification about new layout """
+
+ uid = interface.Attribute('UID')
+
+ name = interface.Attribute('Name')
+
+ view = interface.Attribute('View')
+
+ context = interface.Attribute('Context')
+
+ layer = interface.Attribute('Layer')
+
+ layoutclass = interface.Attribute('Generated class for layout')
+
+ keywords = interface.Attribute('Keywords')
Deleted: z3ext.layout/tags/1.6.0/src/z3ext/layout/zcml.py
===================================================================
--- z3ext.layout/trunk/src/z3ext/layout/zcml.py 2008-11-26 10:04:12 UTC (rev 93368)
+++ z3ext.layout/tags/1.6.0/src/z3ext/layout/zcml.py 2008-11-26 17:33:45 UTC (rev 93370)
@@ -1,394 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-import os.path
-from zope import schema, interface, event
-from zope.component.interface import provideInterface
-from zope.component.zcml import handler, adapter, utility
-from zope.security.checker import defineChecker, Checker, CheckerPublic
-from zope.configuration.fields import Path, Tokens, GlobalObject, GlobalInterface
-from zope.configuration.exceptions import ConfigurationError
-from zope.publisher.interfaces.browser import IBrowserPublisher
-from zope.publisher.interfaces.browser import IDefaultBrowserLayer
-from zope.app.component.metadirectives import IBasicViewInformation
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-
-from interfaces import IPagelet, IPageletType
-from interfaces import ILayout, ILayoutCreatedEvent
-
-from pagelet import BrowserPagelet
-from layout import Layout, LayoutTemplateFile
-
-
-class IPageletDirective(IBasicViewInformation):
- """A directive to register a new pagelet.
-
- The pagelet directive also supports an undefined set of keyword arguments
- that are set as attributes on the pagelet after creation.
- """
-
- for_ = GlobalObject(
- title = u"Context",
- description = u"The content interface or class this pagelet is for.",
- required = False)
-
- name = schema.TextLine(
- title = u"The name of the pagelet.",
- description = u"The name shows up in URLs/paths. For example 'foo'.",
- required = False)
-
- provides = Tokens(
- title = u"The interface this pagelets provides.",
- description = u"""A pagelet can provide an interface. This would be used for
- views that support other views.""",
- required = False,
- value_type = GlobalInterface(),
- default = [IPagelet,])
-
- class_ = GlobalObject(
- title=u"Class",
- description=u"A class that provides attributes used by the pagelet.",
- required=False,
- )
-
- template = Path(
- title = u'Pagelet template.',
- description = u"Refers to a file containing a page template (should "\
- "end in extension ``.pt`` or ``.html``).",
- required=False)
-
- layout = schema.TextLine(
- title = u'The name of the layout.',
- description = u"The name is used to look up the layout.",
- default=u'',
- required=False)
-
-# Arbitrary keys and values are allowed to be passed to the pagelet.
-IPageletDirective.setTaggedValue('keyword_arguments', True)
-
-
-class ILayoutDirective(interface.Interface):
-
- template = Path(
- title=u'Layout template.',
- description=u"Refers to a file containing a page template (should "
- "end in extension ``.pt`` or ``.html``).",
- required=False,
- )
-
- name = schema.TextLine(
- title=u"The name of the layout.",
- description=u"The name is used to look up the layout.",
- default=u'',
- required=False)
-
- layer = GlobalObject(
- title = u'Layer',
- description = u'The layer for which the template should be available',
- required = False,
- default=IDefaultBrowserLayer,
- )
-
- contentType = schema.BytesLine(
- title = u'Content Type',
- description=u'The content type identifies the type of data.',
- default='text/html',
- required=False,
- )
-
- provides = GlobalInterface(
- title=u"Interface the layout provides",
- description=u"This attribute specifies the interface the layout"
- " instance will provide.",
- default=ILayout,
- required=False,
- )
-
- for_ = GlobalObject(
- title = u'Context',
- description = u'The object for which the layout should be available',
- default=interface.Interface,
- required = False)
-
- view = GlobalObject(
- title = u'View',
- description = u'The view for which the layout should be available',
- default=interface.Interface,
- required = False)
-
- class_ = GlobalObject(
- title=u"Class",
- description=u"A class that provides attributes used by the layout.",
- required=False,
- )
-
- layout = schema.TextLine(
- title = u'Layout',
- description = u'Custom layout name.',
- required = False)
-
- title = schema.TextLine(
- title = u'Layout title',
- required = False)
-
- description = schema.TextLine(
- title = u'Layout description',
- required = False)
-
-# Arbitrary keys and values are allowed
-ILayoutDirective.setTaggedValue('keyword_arguments', True)
-
-
-def layoutDirective(
- _context, template='', for_=None, view=None, name = u'',
- layer = IDefaultBrowserLayer, provides = ILayout,
- contentType='text/html', class_ = None, layout = '',
- title='', description='', **kwargs):
-
- if not layout:
- layout = None
- elif layout == '.':
- layout = ''
-
- # Make sure that the template exists
- if template:
- template = os.path.abspath(str(_context.path(template)))
- if not os.path.isfile(template):
- raise ConfigurationError("No such file", template)
-
- # Check
- if (for_ is None) and (view is None):
- raise ConfigurationError("FOR or VIEW are required.")
-
- # Build a new class that we can use different permission settings if we
- # use the class more then once.
- cdict = {}
- cdict['__name__'] = name
- cdict['layout'] = layout
- cdict['title'] = title
- cdict['description'] = description
-
- if template:
- cdict['template'] = LayoutTemplateFile(template, content_type=contentType)
-
- cdict.update(kwargs)
-
- class_name = 'Layout<%s>'%name
-
- if class_ is None:
- bases = (Layout,)
- else:
- bases = (class_, Layout)
-
- newclass = type(str(class_name), bases, cdict)
-
- # Set up permission mapping for various accessible attributes
- required = {}
-
- for iface in (provides, ILayout):
- for iname in iface:
- required[iname] = CheckerPublic
-
- required = {'__call__': CheckerPublic,
- 'browserDefault': CheckerPublic,
- 'publishTraverse': CheckerPublic}
-
- # provide the custom provides interface if not allready provided
- if not provides.implementedBy(newclass):
- interface.classImplements(newclass, provides)
-
- # security checker
- defineChecker(newclass, Checker(required))
-
- if for_ is not None:
- # register the template
- if name:
- adapter(_context, (newclass,),
- provides, (interface.Interface, for_, layer), name=name)
- else:
- adapter(_context, (newclass,),
- provides, (interface.Interface, for_, layer))
-
- # send ILayoutCreatedEvent event
- _context.action(
- discriminator = ('z3ext.layout', name, interface.Interface, for_, layer),
- callable = sendNotification,
- args = (name, interface.Interface, for_, layer, newclass, kwargs),
- order = 99999999)
-
- if view is not None:
- # register the template
- if name:
- adapter(_context, (newclass,),
- provides, (view, interface.Interface, layer), name=name)
- else:
- adapter(_context, (newclass,),
- provides, (view, interface.Interface, layer))
-
- # send ILayoutCreatedEvent event
- _context.action(
- discriminator = ('z3ext.layout', name, view, interface.Interface, layer),
- callable = sendNotification,
- args = (name, view, interface.Interface, layer, newclass, kwargs),
- order = 99999999)
-
-
-class LayoutCreatedEvent(object):
- interface.implements(ILayoutCreatedEvent)
-
- def __init__(self, name, view, context, layer, layoutclass, keywords):
- self.name = name
- self.view = view
- self.context = context
- self.layer = layer
- self.layoutclass = layoutclass
- self.keywords = keywords
-
-
-def sendNotification(name, view, context, layer, layoutclass, keywords):
- event.notify(LayoutCreatedEvent(
- name, view, context, layer, layoutclass, keywords))
-
-
-# pagelet directive
-def pageletDirective(
- _context, permission, name=u'', class_=None, for_=interface.Interface,
- layer=IDefaultBrowserLayer, provides=[IPagelet,],
- allowed_interface=[], allowed_attributes=[],
- template=u'', layout=u'', **kwargs):
-
- # Security map dictionary
- required = {}
-
- # Get the permission; mainly to correctly handle CheckerPublic.
- if permission == 'zope.Public':
- permission = CheckerPublic
-
- # Make sure that the template exists
- if template:
- template = os.path.abspath(str(_context.path(template)))
- if not os.path.isfile(template):
- raise ConfigurationError("No such file", template)
- kwargs['template'] = ViewPageTemplateFile(template)
-
- # Build a new class that we can use different permission settings if we
- # use the class more then once.
- cdict = {}
- cdict.update(kwargs)
- cdict['__name__'] = name
- cdict['layoutname'] = layout
-
- if class_ is not None:
- if issubclass(class_, BrowserPagelet):
- bases = (class_,)
- else:
- bases = (class_, BrowserPagelet)
- else:
- bases = (BrowserPagelet,)
-
- new_class = type('PageletClass from %s'%class_, bases, cdict)
-
- # check name
- if not name:
- for iface in provides:
- # allow register nameless pagelet as IPagelet
- if iface is IPagelet:
- continue
-
- if iface.isOrExtends(IBrowserPublisher):
- raise ConfigurationError(
- "You can't register nameless pagelet, "\
- "interface '%s' is or extends IBrowserPublisher"%iface)
-
- # add IPagelet to provides
- if name:
- inProvides = False
- for iface in provides:
- if IPagelet.isOrExtends(iface) and not IPageletType.providedBy(iface):
- inProvides = True
-
- if not inProvides:
- provides.append(IPagelet)
-
- # prepare allowed interfaces and attributes
- allowed_interface.extend(provides)
- if IPagelet not in provides:
- allowed_interface.append(IPagelet)
-
- allowed_attributes.extend(kwargs.keys())
- allowed_attributes.extend(('__call__', 'browserDefault',
- 'update', 'render', 'publishTraverse'))
-
- # Set up permission mapping for various accessible attributes
- _handle_allowed_interface(
- _context, allowed_interface, permission, required)
- _handle_allowed_attributes(
- _context, allowed_attributes, permission, required)
-
- # Register the interfaces.
- _handle_for(_context, for_)
-
- # provide the custom provides interface if not allready provided
- for iface in provides:
- if not iface.implementedBy(new_class):
- interface.classImplements(new_class, iface)
-
- # Create the security checker for the new class
- defineChecker(new_class, Checker(required))
-
- # register pagelet
- _context.action(
- discriminator = ('z3ext.layout:registerPagelets', new_class),
- callable = registerPagelets,
- args = (for_, layer, new_class, provides, name, _context.info))
-
-
-def registerPagelets(for_, layer, newClass, provides, name, info):
- for iface in provides:
- if IPageletType.providedBy(iface):
- handler('registerAdapter', newClass, (for_, layer), iface, '', info)
- else:
- handler('registerAdapter', newClass, (for_, layer), iface, name, info)
-
-
-def _handle_allowed_interface(
- _context, allowed_interface, permission, required):
- # Allow access for all names defined by named interfaces
- if allowed_interface:
- for i in allowed_interface:
- _context.action(
- discriminator = None,
- callable = provideInterface,
- args = (None, i))
-
- for name in i:
- required[name] = permission
-
-def _handle_allowed_attributes(
- _context, allowed_attributes, permission, required):
-
- # Allow access for all named attributes
- if allowed_attributes:
- for name in allowed_attributes:
- required[name] = permission
-
-def _handle_for(_context, for_):
- if for_ is not None:
- _context.action(
- discriminator = None,
- callable = provideInterface,
- args = ('', for_))
Copied: z3ext.layout/tags/1.6.0/src/z3ext/layout/zcml.py (from rev 93369, z3ext.layout/trunk/src/z3ext/layout/zcml.py)
===================================================================
--- z3ext.layout/tags/1.6.0/src/z3ext/layout/zcml.py (rev 0)
+++ z3ext.layout/tags/1.6.0/src/z3ext/layout/zcml.py 2008-11-26 17:33:45 UTC (rev 93370)
@@ -0,0 +1,403 @@
+##############################################################################
+#
+# Copyright (c) 2007 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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+import os.path
+from zope import schema, interface, event
+from zope.component.interface import provideInterface
+from zope.component.zcml import handler, adapter, utility
+from zope.security.checker import defineChecker, Checker, CheckerPublic
+from zope.configuration.fields import Path, Tokens, GlobalObject, GlobalInterface
+from zope.configuration.exceptions import ConfigurationError
+from zope.publisher.interfaces.browser import IBrowserPublisher
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+from zope.app.component.metadirectives import IBasicViewInformation
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+
+from interfaces import IPagelet, IPageletType
+from interfaces import ILayout, ILayoutCreatedEvent
+
+from pagelet import BrowserPagelet
+from layout import Layout, LayoutTemplateFile
+
+
+class IPageletDirective(IBasicViewInformation):
+ """A directive to register a new pagelet.
+
+ The pagelet directive also supports an undefined set of keyword arguments
+ that are set as attributes on the pagelet after creation.
+ """
+
+ for_ = GlobalObject(
+ title = u"Context",
+ description = u"The content interface or class this pagelet is for.",
+ required = False)
+
+ name = schema.TextLine(
+ title = u"The name of the pagelet.",
+ description = u"The name shows up in URLs/paths. For example 'foo'.",
+ required = False)
+
+ provides = Tokens(
+ title = u"The interface this pagelets provides.",
+ description = u"""A pagelet can provide an interface. This would be used for
+ views that support other views.""",
+ required = False,
+ value_type = GlobalInterface(),
+ default = [IPagelet,])
+
+ class_ = GlobalObject(
+ title=u"Class",
+ description=u"A class that provides attributes used by the pagelet.",
+ required=False,
+ )
+
+ template = Path(
+ title = u'Pagelet template.',
+ description = u"Refers to a file containing a page template (should "\
+ "end in extension ``.pt`` or ``.html``).",
+ required=False)
+
+ layout = schema.TextLine(
+ title = u'The name of the layout.',
+ description = u"The name is used to look up the layout.",
+ default=u'',
+ required=False)
+
+# Arbitrary keys and values are allowed to be passed to the pagelet.
+IPageletDirective.setTaggedValue('keyword_arguments', True)
+
+
+class ILayoutDirective(interface.Interface):
+
+ uid = schema.TextLine(
+ title = u"Unique layout id",
+ default = u'',
+ required = False)
+
+ template = Path(
+ title=u'Layout template.',
+ description=u"Refers to a file containing a page template (should "
+ "end in extension ``.pt`` or ``.html``).",
+ required=False,
+ )
+
+ name = schema.TextLine(
+ title=u"The name of the layout.",
+ description=u"The name is used to look up the layout.",
+ default=u'',
+ required=False)
+
+ layer = GlobalObject(
+ title = u'Layer',
+ description = u'The layer for which the template should be available',
+ required = False,
+ default=IDefaultBrowserLayer,
+ )
+
+ contentType = schema.BytesLine(
+ title = u'Content Type',
+ description=u'The content type identifies the type of data.',
+ default='text/html',
+ required=False,
+ )
+
+ provides = GlobalInterface(
+ title=u"Interface the layout provides",
+ description=u"This attribute specifies the interface the layout"
+ " instance will provide.",
+ default=ILayout,
+ required=False,
+ )
+
+ for_ = GlobalObject(
+ title = u'Context',
+ description = u'The object for which the layout should be available',
+ default=interface.Interface,
+ required = False)
+
+ view = GlobalObject(
+ title = u'View',
+ description = u'The view for which the layout should be available',
+ default=interface.Interface,
+ required = False)
+
+ class_ = GlobalObject(
+ title=u"Class",
+ description=u"A class that provides attributes used by the layout.",
+ required=False,
+ )
+
+ layout = schema.TextLine(
+ title = u'Layout',
+ description = u'Custom layout name.',
+ required = False)
+
+ title = schema.TextLine(
+ title = u'Layout title',
+ required = False)
+
+ description = schema.TextLine(
+ title = u'Layout description',
+ required = False)
+
+# Arbitrary keys and values are allowed
+ILayoutDirective.setTaggedValue('keyword_arguments', True)
+
+
+def layoutDirective(
+ _context, uid='', template='', for_=None, view=None, name = u'',
+ layer = IDefaultBrowserLayer, provides = ILayout,
+ contentType='text/html', class_ = None, layout = '',
+ title='', description='', **kwargs):
+
+ if not layout:
+ layout = None
+ elif layout == '.':
+ layout = ''
+
+ # Make sure that the template exists
+ if template:
+ template = os.path.abspath(str(_context.path(template)))
+ if not os.path.isfile(template):
+ raise ConfigurationError("No such file", template)
+
+ # Check
+ if (for_ is None) and (view is None):
+ raise ConfigurationError("FOR or VIEW are required.")
+
+ # Build a new class that we can use different permission settings if we
+ # use the class more then once.
+ cdict = {}
+ cdict['__name__'] = name
+ cdict['layout'] = layout
+ cdict['title'] = title
+ cdict['description'] = description
+
+ if template:
+ cdict['template'] = LayoutTemplateFile(template, content_type=contentType)
+
+ cdict.update(kwargs)
+
+ class_name = 'Layout<%s>'%name
+
+ if class_ is None:
+ bases = (Layout,)
+ else:
+ bases = (class_, Layout)
+
+ newclass = type(str(class_name), bases, cdict)
+
+ # Set up permission mapping for various accessible attributes
+ required = {}
+
+ for iface in (provides, ILayout):
+ for iname in iface:
+ required[iname] = CheckerPublic
+
+ required = {'__call__': CheckerPublic,
+ 'browserDefault': CheckerPublic,
+ 'publishTraverse': CheckerPublic}
+
+ # provide the custom provides interface if not allready provided
+ if not provides.implementedBy(newclass):
+ interface.classImplements(newclass, provides)
+
+ # security checker
+ defineChecker(newclass, Checker(required))
+
+ if for_ is not None:
+ # register the template
+ if name:
+ adapter(_context, (newclass,),
+ provides, (interface.Interface, for_, layer), name=name)
+ else:
+ adapter(_context, (newclass,),
+ provides, (interface.Interface, for_, layer))
+
+ # send ILayoutCreatedEvent event
+ if uid:
+ _context.action(
+ discriminator = ('z3ext.layout', uid),
+ callable = sendNotification,
+ args = (uid, name, interface.Interface, for_, layer, newclass, kwargs),
+ order = 99999999)
+
+ if view is not None:
+ # register the template
+ if name:
+ adapter(_context, (newclass,),
+ provides, (view, interface.Interface, layer), name=name)
+ else:
+ adapter(_context, (newclass,),
+ provides, (view, interface.Interface, layer))
+
+ # send ILayoutCreatedEvent event
+ if uid:
+ _context.action(
+ discriminator = ('z3ext.layout', uid),
+ callable = sendNotification,
+ args = (uid, name, view, interface.Interface, layer, newclass, kwargs),
+ order = 99999999)
+
+
+class LayoutCreatedEvent(object):
+ interface.implements(ILayoutCreatedEvent)
+
+ def __init__(self, uid, name, view,
+ context, layer, layoutclass, keywords):
+ self.uid = uid
+ self.name = name
+ self.view = view
+ self.context = context
+ self.layer = layer
+ self.layoutclass = layoutclass
+ self.keywords = keywords
+
+
+def sendNotification(uid, name, view, context, layer, layoutclass, keywords):
+ event.notify(LayoutCreatedEvent(
+ uid, name, view, context, layer, layoutclass, keywords))
+
+
+# pagelet directive
+def pageletDirective(
+ _context, permission, name=u'', class_=None, for_=interface.Interface,
+ layer=IDefaultBrowserLayer, provides=[IPagelet,],
+ allowed_interface=[], allowed_attributes=[],
+ template=u'', layout=u'', **kwargs):
+
+ # Security map dictionary
+ required = {}
+
+ # Get the permission; mainly to correctly handle CheckerPublic.
+ if permission == 'zope.Public':
+ permission = CheckerPublic
+
+ # Make sure that the template exists
+ if template:
+ template = os.path.abspath(str(_context.path(template)))
+ if not os.path.isfile(template):
+ raise ConfigurationError("No such file", template)
+ kwargs['template'] = ViewPageTemplateFile(template)
+
+ # Build a new class that we can use different permission settings if we
+ # use the class more then once.
+ cdict = {}
+ cdict.update(kwargs)
+ cdict['__name__'] = name
+ cdict['layoutname'] = layout
+
+ if class_ is not None:
+ if issubclass(class_, BrowserPagelet):
+ bases = (class_,)
+ else:
+ bases = (class_, BrowserPagelet)
+ else:
+ bases = (BrowserPagelet,)
+
+ new_class = type('PageletClass from %s'%class_, bases, cdict)
+
+ # check name
+ if not name:
+ for iface in provides:
+ # allow register nameless pagelet as IPagelet
+ if iface is IPagelet:
+ continue
+
+ if iface.isOrExtends(IBrowserPublisher):
+ raise ConfigurationError(
+ "You can't register nameless pagelet, "\
+ "interface '%s' is or extends IBrowserPublisher"%iface)
+
+ # add IPagelet to provides
+ if name:
+ inProvides = False
+ for iface in provides:
+ if IPagelet.isOrExtends(iface) and not IPageletType.providedBy(iface):
+ inProvides = True
+
+ if not inProvides:
+ provides.append(IPagelet)
+
+ # prepare allowed interfaces and attributes
+ allowed_interface.extend(provides)
+ if IPagelet not in provides:
+ allowed_interface.append(IPagelet)
+
+ allowed_attributes.extend(kwargs.keys())
+ allowed_attributes.extend(('__call__', 'browserDefault',
+ 'update', 'render', 'publishTraverse'))
+
+ # Set up permission mapping for various accessible attributes
+ _handle_allowed_interface(
+ _context, allowed_interface, permission, required)
+ _handle_allowed_attributes(
+ _context, allowed_attributes, permission, required)
+
+ # Register the interfaces.
+ _handle_for(_context, for_)
+
+ # provide the custom provides interface if not allready provided
+ for iface in provides:
+ if not iface.implementedBy(new_class):
+ interface.classImplements(new_class, iface)
+
+ # Create the security checker for the new class
+ defineChecker(new_class, Checker(required))
+
+ # register pagelet
+ _context.action(
+ discriminator = ('z3ext.layout:registerPagelets', new_class),
+ callable = registerPagelets,
+ args = (for_, layer, new_class, provides, name, _context.info))
+
+
+def registerPagelets(for_, layer, newClass, provides, name, info):
+ for iface in provides:
+ if IPageletType.providedBy(iface):
+ handler('registerAdapter', newClass, (for_, layer), iface, '', info)
+ else:
+ handler('registerAdapter', newClass, (for_, layer), iface, name, info)
+
+
+def _handle_allowed_interface(
+ _context, allowed_interface, permission, required):
+ # Allow access for all names defined by named interfaces
+ if allowed_interface:
+ for i in allowed_interface:
+ _context.action(
+ discriminator = None,
+ callable = provideInterface,
+ args = (None, i))
+
+ for name in i:
+ required[name] = permission
+
+def _handle_allowed_attributes(
+ _context, allowed_attributes, permission, required):
+
+ # Allow access for all named attributes
+ if allowed_attributes:
+ for name in allowed_attributes:
+ required[name] = permission
+
+def _handle_for(_context, for_):
+ if for_ is not None:
+ _context.action(
+ discriminator = None,
+ callable = provideInterface,
+ args = ('', for_))
More information about the Checkins
mailing list