Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
a827bf6c
Commit
a827bf6c
authored
Aug 29, 2009
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow the zope.app.publisher refactoring - be gone!
parent
b3f9ecc7
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
63 additions
and
55 deletions
+63
-55
ZOPE_APP_DEPENDENCIES.rst
ZOPE_APP_DEPENDENCIES.rst
+1
-1
alltests.cfg
alltests.cfg
+2
-1
doc/CHANGES.rst
doc/CHANGES.rst
+4
-0
setup.py
setup.py
+4
-1
src/Products/Five/browser/adding.py
src/Products/Five/browser/adding.py
+1
-1
src/Products/Five/browser/configure.zcml
src/Products/Five/browser/configure.zcml
+3
-3
src/Products/Five/browser/menu.py
src/Products/Five/browser/menu.py
+2
-2
src/Products/Five/browser/meta.zcml
src/Products/Five/browser/meta.zcml
+21
-22
src/Products/Five/browser/metaconfigure.py
src/Products/Five/browser/metaconfigure.py
+7
-7
src/Products/Five/browser/resource.py
src/Products/Five/browser/resource.py
+8
-7
src/Products/Five/browser/tests/test_menu.py
src/Products/Five/browser/tests/test_menu.py
+1
-1
src/Products/Five/fivedirectives.py
src/Products/Five/fivedirectives.py
+1
-1
src/Products/Five/form/metaconfigure.py
src/Products/Five/form/metaconfigure.py
+1
-1
src/Products/Five/viewlet/metaconfigure.py
src/Products/Five/viewlet/metaconfigure.py
+3
-3
versions.cfg
versions.cfg
+4
-4
No files found.
ZOPE_APP_DEPENDENCIES.rst
View file @
a827bf6c
...
...
@@ -28,7 +28,7 @@ Zope2 depends on the following zope.app packages directly:
o Products.Five.component (for ``IBeginRequestEvent``,
``IEndRequestEvent``, and ``BeforeTraverseEvent``.)
- [
_
] zope.app.publisher
- [
X
] zope.app.publisher
* ZPublisher.BaseRequest
o Products.Five.browser.adding (for ``getMenu``)
o Products/Five/browser/configure.zcml (for ``IMenuItemType``,
...
...
alltests.cfg
View file @
a827bf6c
...
...
@@ -61,7 +61,8 @@ eggs =
zope.structuredtext
zope.tal
zope.tales
zope.testbrowser
# XXX The testbrowser tests currently fail on its trunk
# zope.testbrowser
zope.thread
zope.traversing
zope.viewlet
...
...
doc/CHANGES.rst
View file @
a827bf6c
...
...
@@ -52,6 +52,7 @@ Features Added
- zope.app.form = 3.8.1
- zope.app.i18n = 3.6.1
- zope.app.publication = 3.8.1
- zope.app.publisher = 3.9.0
- zope.app.renderer = 3.5.1
- zope.app.security = 3.7.1
- zope.app.testing = 3.7.1
...
...
@@ -60,14 +61,17 @@ Features Added
- zope.browsermenu = 3.9.0
- zope.browserresource = 3.9.0
- zope.component = 3.7.1
- zope.container = 3.9.0
- zope.i18nmessageid = 3.5.0
- zope.index = 3.6.0
- zope.location = 3.6.0
- zope.ptresource = 3.9.0
- zope.publisher = 3.9.0
- zope.securitypolicy = 3.6.1
- zope.server = 3.6.0
- zope.site = 3.6.2
- zope.testing = 3.8.1
- zope.traversing = 3.7.2
- zope.viewlet = 3.6.1
Bugs Fixed
...
...
setup.py
View file @
a827bf6c
...
...
@@ -99,6 +99,9 @@ params = dict(name='Zope2',
'tempstorage'
,
'transaction'
,
'zdaemon'
,
'zope.browsermenu'
,
'zope.browserpage'
,
'zope.browserresource'
,
'zope.component'
,
'zope.configuration'
,
'zope.container'
,
...
...
@@ -116,6 +119,7 @@ params = dict(name='Zope2',
'zope.pagetemplate'
,
'zope.processlifetime'
,
'zope.proxy'
,
'zope.ptresource'
,
'zope.publisher'
,
'zope.schema'
,
'zope.security'
,
...
...
@@ -132,7 +136,6 @@ params = dict(name='Zope2',
'zope.viewlet'
,
'zope.app.form'
,
'zope.app.publication'
,
'zope.app.publisher'
,
'zope.app.schema'
,
],
...
...
src/Products/Five/browser/adding.py
View file @
a827bf6c
...
...
@@ -23,8 +23,8 @@ $Id$
__docformat__
=
'restructuredtext'
from
zope.app.publisher.browser.menu
import
getMenu
from
zope.browser.interfaces
import
IAdding
from
zope.browsermenu.menu
import
getMenu
from
zope.component
import
getMultiAdapter
from
zope.component
import
getUtility
from
zope.component
import
queryMultiAdapter
...
...
src/Products/Five/browser/configure.zcml
View file @
a827bf6c
...
...
@@ -2,7 +2,7 @@
xmlns:browser="http://namespaces.zope.org/browser">
<interface
interface="zope.
app.publisher.interfaces.browser
.IMenuItemType"
interface="zope.
browsermenu.interfaces
.IMenuItemType"
/>
<browser:page
...
...
@@ -76,8 +76,8 @@
for="*"
name="view_get_menu"
permission="zope.Public"
class="zope.
app.publisher.browser
.menu.MenuAccessView"
allowed_interface="zope.
app.publisher.interfaces.browser
.IMenuAccessView"
class="zope.
browsermenu
.menu.MenuAccessView"
allowed_interface="zope.
browsermenu.interfaces
.IMenuAccessView"
/>
</configure>
src/Products/Five/browser/menu.py
View file @
a827bf6c
...
...
@@ -19,6 +19,6 @@ import zope.deferredimport
zope
.
deferredimport
.
deprecated
(
"The Five specific view has been made obsolete. Please use the "
"view from zope.
app.publisher
directly."
,
MenuAccessView
=
'zope.
app.publisher.browser
.menu.MenuAccessView'
,
"view from zope.
browsermenu
directly."
,
MenuAccessView
=
'zope.
browsermenu
.menu.MenuAccessView'
,
)
src/Products/Five/browser/meta.zcml
View file @
a827bf6c
...
...
@@ -8,33 +8,33 @@
<meta:directive
name="menu"
schema="zope.
app.publisher.browser
.metadirectives.IMenuDirective"
handler="zope.
app.publisher.browser.menumeta
.menuDirective"
schema="zope.
browsermenu
.metadirectives.IMenuDirective"
handler="zope.
browsermenu.metaconfigure
.menuDirective"
/>
<meta:complexDirective
name="menuItems"
schema="zope.
app.publisher.browser
.metadirectives.IMenuItemsDirective"
handler="zope.
app.publisher.browser.menumeta
.menuItemsDirective"
schema="zope.
browsermenu
.metadirectives.IMenuItemsDirective"
handler="zope.
browsermenu.metaconfigure
.menuItemsDirective"
>
<meta:subdirective
name="menuItem"
schema="zope.
app.publisher.browser
.metadirectives.IMenuItemSubdirective"
schema="zope.
browsermenu
.metadirectives.IMenuItemSubdirective"
/>
</meta:complexDirective>
<meta:directive
name="menuItem"
schema="zope.
app.publisher.browser
.metadirectives.IMenuItemDirective"
handler="zope.
app.publisher.browser.menumeta
.menuItemDirective"
schema="zope.
browsermenu
.metadirectives.IMenuItemDirective"
handler="zope.
browsermenu.metaconfigure
.menuItemDirective"
/>
<meta:directive
name="addMenuItem"
schema="zope.
app.publisher.browser
.metadirectives.IAddMenuItemDirective"
handler="zope.
app.publisher.browser.menumeta
.addMenuItem"
schema="zope.
browsermenu
.metadirectives.IAddMenuItemDirective"
handler="zope.
browsermenu.metaconfigure
.addMenuItem"
/>
...
...
@@ -42,46 +42,45 @@
<meta:complexDirective
name="view"
schema="zope.
app.publisher.browser
.metadirectives.IViewDirective"
schema="zope.
browserpage
.metadirectives.IViewDirective"
handler=".metaconfigure.view"
>
<meta:subdirective
name="page"
schema="zope.
app.publisher.browser
.metadirectives.IViewPageSubdirective"
schema="zope.
browserpage
.metadirectives.IViewPageSubdirective"
/>
<meta:subdirective
name="defaultPage"
schema="zope.
app.publisher.browser
.metadirectives.IViewDefaultPageSubdirective"
schema="zope.
browserpage
.metadirectives.IViewDefaultPageSubdirective"
/>
</meta:complexDirective>
<meta:directive
name="defaultView"
schema="zope.
app.publisher.browser.metadirectives
.IDefaultViewDirective"
handler="zope.
app.publisher.browser.metaconfigure
.defaultView"
schema="zope.
publisher.zcml
.IDefaultViewDirective"
handler="zope.
publisher.zcml
.defaultView"
/>
<!-- browser pages -->
<meta:directive
name="page"
schema="zope.
app.publisher.browser
.metadirectives.IPageDirective"
schema="zope.
browserpage
.metadirectives.IPageDirective"
handler=".metaconfigure.page"
/>
<meta:complexDirective
name="pages"
schema="zope.
app.publisher.browser
.metadirectives.IPagesDirective"
schema="zope.
browserpage
.metadirectives.IPagesDirective"
handler=".metaconfigure.pages"
>
<meta:subdirective
name="page"
schema="zope.
app.publisher.browser
.metadirectives.IPagesPageSubdirective"
schema="zope.
browserpage
.metadirectives.IPagesPageSubdirective"
/>
</meta:complexDirective>
...
...
@@ -91,13 +90,13 @@
<meta:directive
name="resource"
schema="zope.
app.publisher.browser
.metadirectives.IResourceDirective"
schema="zope.
browserresource
.metadirectives.IResourceDirective"
handler=".metaconfigure.resource"
/>
<meta:directive
name="resourceDirectory"
schema="zope.
app.publisher.browser
.metadirectives.IResourceDirectoryDirective"
schema="zope.
browserresource
.metadirectives.IResourceDirectoryDirective"
handler=".metaconfigure.resourceDirectory"
/>
...
...
@@ -106,8 +105,8 @@
<meta:directive
name="defaultSkin"
schema="zope.
app.publisher.browser.metadirectives
.IDefaultSkinDirective"
handler="zope.
app.publisher.browser.metaconfigure
.defaultSkin"
schema="zope.
publisher.zcml
.IDefaultSkinDirective"
handler="zope.
publisher.zcml
.defaultSkin"
/>
</meta:directives>
...
...
src/Products/Five/browser/metaconfigure.py
View file @
a827bf6c
...
...
@@ -32,10 +32,10 @@ from zope.publisher.interfaces.browser import IDefaultBrowserLayer
from
zope.publisher.interfaces.browser
import
IBrowserPublisher
from
zope.publisher.interfaces.browser
import
IBrowserRequest
import
zope.
app.publisher.browser.viewmeta
from
zope.
app.publisher.browser.viewmeta
import
providesCallable
from
zope.
app.publisher.browser.viewmeta
import
_handle_menu
from
zope.
app.publisher.browser.viewmeta
import
_handle_for
import
zope.
browserpage.metaconfigure
from
zope.
browserpage.metaconfigure
import
providesCallable
from
zope.
browserpage.metaconfigure
import
_handle_menu
from
zope.
browserpage.metaconfigure
import
_handle_for
from
AccessControl.security
import
getSecurityInfo
from
AccessControl.security
import
protectClass
...
...
@@ -165,7 +165,7 @@ def page(_context, name, permission, for_,
args
=
(
new_class
,)
)
class
pages
(
zope
.
app
.
publisher
.
browser
.
viewmeta
.
pages
):
class
pages
(
zope
.
browserpage
.
metaconfigure
.
pages
):
def
page
(
self
,
_context
,
name
,
attribute
=
'__call__'
,
template
=
None
,
menu
=
None
,
title
=
None
):
...
...
@@ -178,7 +178,7 @@ class pages(zope.app.publisher.browser.viewmeta.pages):
# view (named view with pages)
class
view
(
zope
.
app
.
publisher
.
browser
.
viewmeta
.
view
):
class
view
(
zope
.
browserpage
.
metaconfigure
.
view
):
def
__call__
(
self
):
(
_context
,
name
,
for_
,
permission
,
layer
,
class_
,
...
...
@@ -396,7 +396,7 @@ def resourceDirectory(_context, name, directory, layer=IDefaultBrowserLayer,
)
class
ViewMixinForAttributes
(
BrowserView
,
zope
.
app
.
publisher
.
browser
.
viewmeta
.
simple
):
zope
.
browserpage
.
metaconfigure
.
simple
):
# For some reason, the 'simple' baseclass doesn't implement this
# mandatory method (see https://bugs.launchpad.net/zope3/+bug/129296)
...
...
src/Products/Five/browser/resource.py
View file @
a827bf6c
...
...
@@ -18,14 +18,14 @@ $Id$
import
os
import
urllib
import
zope.browserresource.directory
import
zope.browserresource.file
from
zope.browserresource.file
import
File
from
zope.interface
import
implements
from
zope.component
import
getMultiAdapter
from
zope.traversing.browser
import
absoluteURL
from
zope.publisher.interfaces
import
NotFound
from
zope.publisher.interfaces.browser
import
IBrowserPublisher
from
zope.app.publisher.browser
import
fileresource
,
directoryresource
from
zope.app.publisher.fileresource
import
File
,
Image
from
zope.app.publisher.pagetemplateresource
import
PageTemplate
from
zope.ptresource.ptresource
import
PageTemplate
from
Products.Five.browser
import
BrowserView
...
...
@@ -70,7 +70,7 @@ class PageTemplateResource(Resource, BrowserView):
pt
=
self
.
context
return
pt
(
self
.
request
)
class
FileResource
(
Resource
,
fileresourc
e
.
FileResource
):
class
FileResource
(
Resource
,
zope
.
browserresource
.
fil
e
.
FileResource
):
pass
class
ResourceFactory
:
...
...
@@ -111,7 +111,7 @@ class FileResourceFactory(ResourceFactory):
class
ImageResourceFactory
(
ResourceFactory
):
"""A factory for Image resources"""
factory
=
Imag
e
factory
=
Fil
e
resource
=
FileResource
...
...
@@ -122,7 +122,8 @@ class Directory:
self
.
path
=
path
self
.
__name__
=
name
class
DirectoryResource
(
Resource
,
directoryresource
.
DirectoryResource
):
class
DirectoryResource
(
Resource
,
zope
.
browserresource
.
directory
.
DirectoryResource
):
resource_factories
=
{
'gif'
:
ImageResourceFactory
,
...
...
src/Products/Five/browser/tests/test_menu.py
View file @
a827bf6c
...
...
@@ -36,7 +36,7 @@ def test_menu():
Now for some actual testing... Let's look up the menu we registered:
>>> from zope.publisher.browser import TestRequest
>>> from zope.
app.publisher.browser
.menu import getMenu
>>> from zope.
browsermenu
.menu import getMenu
>>> request = TestRequest()
>>> menu = getMenu('testmenu', self.folder, request)
...
...
src/Products/Five/fivedirectives.py
View file @
a827bf6c
...
...
@@ -16,7 +16,7 @@
$Id$
"""
from
zope.interface
import
Interface
from
zope.
app.publisher.browser
.metadirectives
import
IBasicResourceInformation
from
zope.
browserresource
.metadirectives
import
IBasicResourceInformation
from
zope.security.zcml
import
Permission
from
zope.configuration.fields
import
GlobalObject
,
Tokens
,
PythonIdentifier
from
zope.configuration.fields
import
Bool
...
...
src/Products/Five/form/metaconfigure.py
View file @
a827bf6c
...
...
@@ -23,7 +23,7 @@ from zope.interface import Interface
from
zope.i18nmessageid
import
MessageFactory
_
=
MessageFactory
(
'zope'
)
from
zope.
app.publisher.browser.menumeta
import
menuItemDirective
from
zope.
browsermenu.metaconfigure
import
menuItemDirective
from
zope.app.form.browser.metaconfigure
import
BaseFormDirective
from
zope.browser.interfaces
import
IAdding
from
zope.publisher.interfaces.browser
import
IDefaultBrowserLayer
...
...
src/Products/Five/viewlet/metaconfigure.py
View file @
a827bf6c
...
...
@@ -17,7 +17,7 @@ $Id$
"""
import
os
from
zope.
app.publisher.browser
import
viewmeta
from
zope.
browserpage.metaconfigure
import
_handle_for
from
zope.component
import
zcml
from
zope.configuration.exceptions
import
ConfigurationError
from
zope.interface
import
Interface
...
...
@@ -65,7 +65,7 @@ def viewletManagerDirective(
new_class
=
manager
.
ViewletManager
(
name
,
provides
,
bases
=
(
class_
,
))
# Register interfaces
viewmeta
.
_handle_for
(
_context
,
for_
)
_handle_for
(
_context
,
for_
)
zcml
.
interface
(
_context
,
view
)
# register a viewlet manager
...
...
@@ -161,7 +161,7 @@ def viewletDirective(
attributes
=
kwargs
)
# Register the interfaces.
viewmeta
.
_handle_for
(
_context
,
for_
)
_handle_for
(
_context
,
for_
)
zcml
.
interface
(
_context
,
view
)
# register viewlet
...
...
versions.cfg
View file @
a827bf6c
...
...
@@ -52,7 +52,7 @@ zope.app.localpermission = 3.7.0
zope.app.pagetemplate = 3.7.1
zope.app.principalannotation = 3.6.1
zope.app.publication = 3.8.1
zope.app.publisher = 3.
8.4
zope.app.publisher = 3.
9.0
zope.app.renderer = 3.5.1
zope.app.rotterdam = 3.5.0
zope.app.schema = 3.5.0
...
...
@@ -74,7 +74,7 @@ zope.catalog = 3.8.0
zope.component = 3.7.1
zope.componentvocabulary = 1.0
zope.configuration = 3.6.0
zope.container = 3.
8.2
zope.container = 3.
9.0
zope.contentprovider = 3.5.0
zope.contenttype = 3.4.2
zope.copy = 3.5.0
...
...
@@ -109,7 +109,7 @@ zope.principalregistry = 3.7.0
zope.processlifetime = 1.0
zope.proxy = 3.5.0
zope.ptresource = 3.9.0
zope.publisher = 3.
8
.0
zope.publisher = 3.
9
.0
zope.schema = 3.5.4
zope.security = 3.7.1
zope.securitypolicy = 3.6.1
...
...
@@ -125,5 +125,5 @@ zope.tales = 3.4.0
zope.testbrowser = 3.6.0a2
zope.testing = 3.8.1
zope.thread = 3.4
zope.traversing = 3.7.
1
zope.traversing = 3.7.
2
zope.viewlet = 3.6.1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment