[Checkins] SVN: z3ext.layout/tags/1.4.4/ tag for egg 1.4.4
Nikolay Kim
fafhrd at datacom.kz
Mon Jul 21 16:13:52 EDT 2008
Log message for revision 88658:
tag for egg 1.4.4
Changed:
A z3ext.layout/tags/1.4.4/
D z3ext.layout/tags/1.4.4/CHANGES.txt
A z3ext.layout/tags/1.4.4/CHANGES.txt
D z3ext.layout/tags/1.4.4/setup.py
A z3ext.layout/tags/1.4.4/setup.py
D z3ext.layout/tags/1.4.4/src/z3ext/layout/pagelet.py
A z3ext.layout/tags/1.4.4/src/z3ext/layout/pagelet.py
-=-
Copied: z3ext.layout/tags/1.4.4 (from rev 88426, z3ext.layout/trunk)
Deleted: z3ext.layout/tags/1.4.4/CHANGES.txt
===================================================================
--- z3ext.layout/trunk/CHANGES.txt 2008-07-17 00:55:16 UTC (rev 88426)
+++ z3ext.layout/tags/1.4.4/CHANGES.txt 2008-07-21 20:13:51 UTC (rev 88658)
@@ -1,99 +0,0 @@
-=======
-CHANGES
-=======
-
-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.4.4/CHANGES.txt (from rev 88657, z3ext.layout/trunk/CHANGES.txt)
===================================================================
--- z3ext.layout/tags/1.4.4/CHANGES.txt (rev 0)
+++ z3ext.layout/tags/1.4.4/CHANGES.txt 2008-07-21 20:13:51 UTC (rev 88658)
@@ -0,0 +1,105 @@
+=======
+CHANGES
+=======
+
+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.4.4/setup.py
===================================================================
--- z3ext.layout/trunk/setup.py 2008-07-17 00:55:16 UTC (rev 88426)
+++ z3ext.layout/tags/1.4.4/setup.py 2008-07-21 20:13:51 UTC (rev 88658)
@@ -1,75 +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.4.4dev'
-
-
-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.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.4.4/setup.py (from rev 88657, z3ext.layout/trunk/setup.py)
===================================================================
--- z3ext.layout/tags/1.4.4/setup.py (rev 0)
+++ z3ext.layout/tags/1.4.4/setup.py 2008-07-21 20:13:51 UTC (rev 88658)
@@ -0,0 +1,75 @@
+##############################################################################
+#
+# 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.4.4'
+
+
+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.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.4.4/src/z3ext/layout/pagelet.py
===================================================================
--- z3ext.layout/trunk/src/z3ext/layout/pagelet.py 2008-07-17 00:55:16 UTC (rev 88426)
+++ z3ext.layout/tags/1.4.4/src/z3ext/layout/pagelet.py 2008-07-21 20:13:51 UTC (rev 88658)
@@ -1,91 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 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$
-"""
-from zope import interface, component
-from zope.publisher.browser import BrowserPage
-from zope.component import getMultiAdapter, queryMultiAdapter
-from zope.pagetemplate.interfaces import IPageTemplate
-from zope.app.publisher.browser import queryDefaultViewName
-
-from z3ext.layout.interfaces import IPagelet, ILayout
-
-
- at interface.implementer(IPagelet)
- at component.adapter(interface.Interface, interface.Interface)
-def queryPagelet(context, request):
- name = queryDefaultViewName(context, request, 'index.html')
- if name:
- view = getMultiAdapter((context, request), name=name)
- if IPagelet.providedBy(view):
- return view
-
-
-def queryLayout(view, request, context=None, iface=ILayout, name=''):
- if context is None:
- context = view.context
-
- while context is not None:
- layout = queryMultiAdapter((view, context, request), iface, name)
- if layout is not None:
- return layout
-
- context = getattr(context, '__parent__', None)
-
- return None
-
-
-class BrowserPagelet(BrowserPage):
- interface.implements(IPagelet)
-
- layoutname = u''
-
- index = None
- template = None
-
- def update(self):
- pass
-
- def render(self):
- template = queryMultiAdapter((self, self.request), IPageTemplate)
-
- if template is None:
- template = self.template or self.index
- if template is None:
- raise LookupError("Can't find IPageTemplate for pagelet.")
- return template()
-
- return template(self)
-
- def __call__(self):
- self.update()
-
- if self.isRedirected:
- return u''
-
- layout = queryLayout(self, self.request, name=self.layoutname)
- if layout is None:
- return self.render()
- else:
- return layout()
-
- isRedirected = False
-
- def redirect(self, url=''):
- if url:
- self.request.response.redirect(url)
-
- self.isRedirected = True
Copied: z3ext.layout/tags/1.4.4/src/z3ext/layout/pagelet.py (from rev 88657, z3ext.layout/trunk/src/z3ext/layout/pagelet.py)
===================================================================
--- z3ext.layout/tags/1.4.4/src/z3ext/layout/pagelet.py (rev 0)
+++ z3ext.layout/tags/1.4.4/src/z3ext/layout/pagelet.py 2008-07-21 20:13:51 UTC (rev 88658)
@@ -0,0 +1,91 @@
+##############################################################################
+#
+# Copyright (c) 2008 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$
+"""
+from zope import interface, component
+from zope.component import queryMultiAdapter
+from zope.publisher.browser import BrowserPage
+from zope.pagetemplate.interfaces import IPageTemplate
+from zope.app.publisher.browser import queryDefaultViewName
+
+from z3ext.layout.interfaces import IPagelet, ILayout
+
+
+ at interface.implementer(IPagelet)
+ at component.adapter(interface.Interface, interface.Interface)
+def queryPagelet(context, request):
+ name = queryDefaultViewName(context, request, 'index.html')
+ if name:
+ view = queryMultiAdapter((context, request), name=name)
+ if IPagelet.providedBy(view):
+ return view
+
+
+def queryLayout(view, request, context=None, iface=ILayout, name=''):
+ if context is None:
+ context = view.context
+
+ while context is not None:
+ layout = queryMultiAdapter((view, context, request), iface, name)
+ if layout is not None:
+ return layout
+
+ context = getattr(context, '__parent__', None)
+
+ return None
+
+
+class BrowserPagelet(BrowserPage):
+ interface.implements(IPagelet)
+
+ layoutname = u''
+
+ index = None
+ template = None
+
+ def update(self):
+ pass
+
+ def render(self):
+ template = queryMultiAdapter((self, self.request), IPageTemplate)
+
+ if template is None:
+ template = self.template or self.index
+ if template is None:
+ raise LookupError("Can't find IPageTemplate for pagelet.")
+ return template()
+
+ return template(self)
+
+ def __call__(self):
+ self.update()
+
+ if self.isRedirected:
+ return u''
+
+ layout = queryLayout(self, self.request, name=self.layoutname)
+ if layout is None:
+ return self.render()
+ else:
+ return layout()
+
+ isRedirected = False
+
+ def redirect(self, url=''):
+ if url:
+ self.request.response.redirect(url)
+
+ self.isRedirected = True
More information about the Checkins
mailing list