diff options
author | Jim Fulton <jim@zope.com> | 2002-06-23 17:03:45 +0000 |
---|---|---|
committer | Jim Fulton <jim@zope.com> | 2002-06-23 17:03:45 +0000 |
commit | 2677b463c305af08e2e37c7d521612edc4b25691 (patch) | |
tree | ddde49cce81024f32c2aaca9267622ce7e83002e | |
parent | ba2dfa6d882064553f08a4aa0faa8e0c572ebec6 (diff) | |
download | zope-traversing-2677b463c305af08e2e37c7d521612edc4b25691.tar.gz |
Finished implementing
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/AddMenuProposalAndEndOfZmiNamespace
Updated the service manager to use a menu.
Ripped out the old adder registry code.
-rw-r--r-- | CreateNamespace.py | 35 | ||||
-rw-r--r-- | Namespaces.py | 5 |
2 files changed, 3 insertions, 37 deletions
diff --git a/CreateNamespace.py b/CreateNamespace.py deleted file mode 100644 index 383dad6..0000000 --- a/CreateNamespace.py +++ /dev/null @@ -1,35 +0,0 @@ -############################################################################## -# -# Copyright (c) 2002 Zope Corporation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.0 (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: CreateNamespace.py,v 1.2 2002/06/10 23:28:17 jim Exp $ -""" - -from Zope.ComponentArchitecture import getService -from Namespaces import provideNamespaceHandler -from Exceptions import UnexpectedParameters -from Zope.Exceptions import NotFoundError -from Zope.Proxy.ContextWrapper import ContextWrapper - -def create(name, parameters, pname, ob, request): - if parameters: - raise UnexpectedParameters(parameters) - - for addable in getService(ob, 'AddableContent').getAddables(ob): - if addable.id == name: - return ContextWrapper(addable, ob, name=name) - - raise NotFoundError(ob, pname) - -provideNamespaceHandler('create', create) diff --git a/Namespaces.py b/Namespaces.py index 8ad5960..eb10f65 100644 --- a/Namespaces.py +++ b/Namespaces.py @@ -13,7 +13,7 @@ ############################################################################## """ -$Id: Namespaces.py,v 1.2 2002/06/10 23:28:17 jim Exp $ +$Id: Namespaces.py,v 1.3 2002/06/23 17:03:44 jim Exp $ """ from Zope.Exceptions import NotFoundError @@ -39,6 +39,7 @@ def namespaceLookup(name, ns, qname, parameters, object, request=None): object, name=name) return new +# XXX should get this from zcml # Register the etc, view, and resource namespaces import EtcNamespace, PresentationNamespaces, AttrItemNamespaces -import CreateNamespace, AcquireNamespace +import AcquireNamespace |