[Zope-Checkins] SVN: Products.Five/branches/1.4/ Branch off Five 1.4. We're not releasing Five 1.4b yet, but we need a Five
Log message for revision 65584: Branch off Five 1.4. We're not releasing Five 1.4b yet, but we need a Five branch that is geared towards Zope trunk (=Zope 2.10). Rocky should merge his work only to the Five 1.4 branch. Five 1.4 is geared towards Zope 2.9. Changed: A Products.Five/branches/1.4/ -=- Copied: Products.Five/branches/1.4 (from rev 65583, Products.Five/trunk) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/Traversable.py using startswith()
Log message for revision 65598: using startswith() Changed: U Zope/trunk/lib/python/OFS/Traversable.py -=- Modified: Zope/trunk/lib/python/OFS/Traversable.py === --- Zope/trunk/lib/python/OFS/Traversable.py2006-02-28 16:59:49 UTC (rev 65597) +++ Zope/trunk/lib/python/OFS/Traversable.py2006-02-28 17:17:12 UTC (rev 65598) @@ -173,7 +173,7 @@ name = path_pop() __traceback_info__ = path, name -if name[0] == '_': +if name.startswith('_'): # Never allowed in a URL. raise NotFound, name ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/Traversable.py reverted all changes (obviously having a bad day today)
Log message for revision 65602: reverted all changes (obviously having a bad day today) Changed: U Zope/trunk/lib/python/OFS/Traversable.py -=- Modified: Zope/trunk/lib/python/OFS/Traversable.py === --- Zope/trunk/lib/python/OFS/Traversable.py2006-02-28 18:09:31 UTC (rev 65601) +++ Zope/trunk/lib/python/OFS/Traversable.py2006-02-28 19:12:01 UTC (rev 65602) @@ -134,11 +134,6 @@ the security machinery. Usually invoked using restrictedTraverse(). -if not isinstance(path, str): -path = [x for x in path if x] - -print 'r',self.absolute_url(1), path - if not path: return self ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9/ - Missing import of NotFound in webdav.Resource.
Log message for revision 65607: - Missing import of NotFound in webdav.Resource. Changed: U Zope/branches/2.9/doc/CHANGES.txt U Zope/branches/2.9/lib/python/webdav/Resource.py -=- Modified: Zope/branches/2.9/doc/CHANGES.txt === --- Zope/branches/2.9/doc/CHANGES.txt 2006-02-28 19:55:33 UTC (rev 65606) +++ Zope/branches/2.9/doc/CHANGES.txt 2006-02-28 19:56:14 UTC (rev 65607) @@ -14,6 +14,12 @@ to the rules for such a type laid out in the Python docs: http://docs.python.org/api/supporting-cycle-detection.html + After Zope 2.9.1 + +Bugs fixed + + - Missing import of NotFound in webdav.Resource. + Zope 2.9.1 (2006/02/25) Bugs fixed Modified: Zope/branches/2.9/lib/python/webdav/Resource.py === --- Zope/branches/2.9/lib/python/webdav/Resource.py 2006-02-28 19:55:33 UTC (rev 65606) +++ Zope/branches/2.9/lib/python/webdav/Resource.py 2006-02-28 19:56:14 UTC (rev 65607) @@ -24,7 +24,7 @@ from AccessControl import getSecurityManager from Acquisition import aq_base from zExceptions import BadRequest, MethodNotAllowed -from zExceptions import Unauthorized, Forbidden +from zExceptions import Unauthorized, Forbidden, NotFound from zope.interface import implements from ZPublisher.HTTPRangeSupport import HTTPRangeInterface ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/ - Missing import of NotFound in webdav.Resource.
Log message for revision 65608: - Missing import of NotFound in webdav.Resource. Changed: U Zope/trunk/doc/CHANGES.txt U Zope/trunk/lib/python/webdav/Resource.py -=- Modified: Zope/trunk/doc/CHANGES.txt === --- Zope/trunk/doc/CHANGES.txt 2006-02-28 19:56:14 UTC (rev 65607) +++ Zope/trunk/doc/CHANGES.txt 2006-02-28 20:02:08 UTC (rev 65608) @@ -197,6 +197,8 @@ Bugs Fixed + - Missing import of NotFound in webdav.Resource + - Collector #1819: fixed method signature of MountedObject.SimpleTrailblazer._construct() Modified: Zope/trunk/lib/python/webdav/Resource.py === --- Zope/trunk/lib/python/webdav/Resource.py2006-02-28 19:56:14 UTC (rev 65607) +++ Zope/trunk/lib/python/webdav/Resource.py2006-02-28 20:02:08 UTC (rev 65608) @@ -31,7 +31,7 @@ from AccessControl.Permissions import webdav_access from Acquisition import aq_base from zExceptions import BadRequest, MethodNotAllowed -from zExceptions import Unauthorized, Forbidden +from zExceptions import Unauthorized, Forbidden, NotFound from zope.interface import implements from ZPublisher.HTTPRangeSupport import HTTPRangeInterface ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/ajung-final-zpt-integration/ Integration of Z3 ZPT with the current Z2 trunk and Five trunk
Log message for revision 65609: Integration of Z3 ZPT with the current Z2 trunk and Five trunk Changed: A Zope/branches/ajung-final-zpt-integration/ -=- Copied: Zope/branches/ajung-final-zpt-integration (from rev 65608, Zope/trunk) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/philikon-local-components/ New approach to local components in Zope 2, based on Jim's new component registration
Log message for revision 65631: New approach to local components in Zope 2, based on Jim's new component registration in the jim-adapter branch of Zope 3. Five.component.browser actually features a CustomizationView which lets you walk up to an object, view a list of template-based browser views of that object and lets you customize it locally. The simple doctest passes but some of the details still need to be worked out. In particular, the forms really haven't been tested yet nor viewed in their rendered form (they most probably are very ugly right now). Changed: A Products.Five/branches/philikon-local-components/component/ A Products.Five/branches/philikon-local-components/component/__init__.py A Products.Five/branches/philikon-local-components/component/browser.py A Products.Five/branches/philikon-local-components/component/component.txt A Products.Five/branches/philikon-local-components/component/components.pt A Products.Five/branches/philikon-local-components/component/configure.zcml A Products.Five/branches/philikon-local-components/component/customizeview.pt A Products.Five/branches/philikon-local-components/component/interfaces.py A Products.Five/branches/philikon-local-components/component/templateviews.pt A Products.Five/branches/philikon-local-components/component/tests.py U Products.Five/branches/philikon-local-components/site/browser.py U Products.Five/branches/philikon-local-components/site/localsite.py U Products.Five/branches/philikon-local-components/site/tests/sitemanager.txt U Products.Five/branches/philikon-local-components/site/tests/test_utility.py -=- Added: Products.Five/branches/philikon-local-components/component/__init__.py === --- Products.Five/branches/philikon-local-components/component/__init__.py 2006-03-01 00:04:15 UTC (rev 65630) +++ Products.Five/branches/philikon-local-components/component/__init__.py 2006-03-01 00:34:35 UTC (rev 65631) @@ -0,0 +1,67 @@ +## +# +# Copyright (c) 2006 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. +# +## +Component browser views + +$Id$ + +from zope.event import notify +from zope.interface import alsoProvides, noLongerProvides +from zope.app.publication.zopepublication import BeforeTraverseEvent +from zope.app.component.interfaces import ISite, IPossibleSite + +import ExtensionClass +from Acquisition import aq_base +from Products.SiteAccess.AccessRule import AccessRule +from ZPublisher.BeforeTraverse import registerBeforeTraverse +from ZPublisher.BeforeTraverse import unregisterBeforeTraverse + +# Hook up custom component architecture calls +import zope.app.component.hooks +zope.app.component.hooks.setHooks() + +class LocalSiteHook(ExtensionClass.Base): + +def __call__(self, container, request): +notify(BeforeTraverseEvent(container, request)) + +HOOK_NAME = '__local_site_hook__' + +def enableSite(obj, iface=ISite): +Install __before_traverse__ hook for Local Site + +# We want the original object, not stuff in between, and no acquisition +obj = aq_base(obj) +if not IPossibleSite.providedBy(obj): +raise TypeError, 'Must provide IPossibleSite' +hook = AccessRule(HOOK_NAME) +registerBeforeTraverse(obj, hook, HOOK_NAME, 1) + +if not hasattr(obj, HOOK_NAME): +setattr(obj, HOOK_NAME, LocalSiteHook()) + +alsoProvides(obj, iface) + +def disableSite(obj, iface=ISite): +Remove __before_traverse__ hook for Local Site + +# We want the original object, not stuff in between, and no acquisition +obj = aq_base(obj) +if not iface.providedBy(obj): +raise TypeError('Object must be a site.') + +unregisterBeforeTraverse(obj, HOOK_NAME) +if hasattr(obj, HOOK_NAME): +delattr(obj, HOOK_NAME) + +noLongerProvides(obj, iface) Property changes on: Products.Five/branches/philikon-local-components/component/__init__.py ___ Name: svn:eol-style + native Added: Products.Five/branches/philikon-local-components/component/browser.py === --- Products.Five/branches/philikon-local-components/component/browser.py 2006-03-01 00:04:15 UTC (rev 65630) +++
[Zope-Checkins] SVN: Products.Five/branches/philikon-local-components/component/browser.py Use _setObject which actually adds the object to the items list of the container.
Log message for revision 65656: Use _setObject which actually adds the object to the items list of the container. We probably still need to fix up the ZPT class so that it provides the correct manage_* junk (which essentially means creating a subclass with a bunch of mix-ins). Redirect happens on the response. Changed: U Products.Five/branches/philikon-local-components/component/browser.py -=- Modified: Products.Five/branches/philikon-local-components/component/browser.py === --- Products.Five/branches/philikon-local-components/component/browser.py 2006-03-01 05:18:37 UTC (rev 65655) +++ Products.Five/branches/philikon-local-components/component/browser.py 2006-03-01 05:28:58 UTC (rev 65656) @@ -94,7 +94,7 @@ zpt = ZPTPage() zpt.source = unicode(src) -obj._setOb(viewname, zpt) #XXX there could be a naming conflict +obj._setObject(viewname, zpt) #XXX there could be a naming conflict zpt = getattr(obj, viewname) components = obj.getSiteManager() @@ -111,7 +111,7 @@ def customizeTemplate(self, viewname): zpt = self.doCustomizeTemplate(viewname) #TODO use @@absolute_url view -self.request.redirect(zpt.absolute_url() + /manage_workspace) +self.request.RESPONSE.redirect(zpt.absolute_url() + /manage_workspace) class ZPTViewFactory(object): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/philikon-local-components/component/templateviews.pt correct ZCML info object API
Log message for revision 65659: correct ZCML info object API Changed: U Products.Five/branches/philikon-local-components/component/templateviews.pt -=- Modified: Products.Five/branches/philikon-local-components/component/templateviews.pt === --- Products.Five/branches/philikon-local-components/component/templateviews.pt 2006-03-01 05:30:21 UTC (rev 65658) +++ Products.Five/branches/philikon-local-components/component/templateviews.pt 2006-03-01 05:31:16 UTC (rev 65659) @@ -12,7 +12,7 @@ tal:attributes=href string:@@customizetemplate.html?viewname=${reg/name} tal:content=reg/name /a - as defined in tal:var replace=reg/info/filename /. + as defined in tal:var replace=reg/info/file /. /li /ul ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins