[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser -
resourcemeta.py:1.13 viewmeta.py:1.34
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:10:31 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv30679/src/zope/app/publisher/browser
Modified Files:
resourcemeta.py viewmeta.py
Log Message:
Changed to use presentation service and register by request, not presentation
=== Zope3/src/zope/app/publisher/browser/resourcemeta.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/publisher/browser/resourcemeta.py:1.12 Fri Aug 15 20:43:46 2003
+++ Zope3/src/zope/app/publisher/browser/resourcemeta.py Fri Nov 21 12:10:30 2003
@@ -18,10 +18,10 @@
import os
+from zope.app import zapi
from zope.security.checker import CheckerPublic, NamesChecker
from zope.configuration.exceptions import ConfigurationError
-from zope.app.services.servicenames import Resources
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.interfaces.browser import IBrowserRequest
from zope.app.component.metaconfigure import handler
from fileresource import FileResourceFactory, ImageResourceFactory
@@ -54,10 +54,10 @@
factory = PageTemplateResourceFactory(template, checker)
_context.action(
- discriminator = ('resource', name, IBrowserPresentation, layer),
+ discriminator = ('resource', name, IBrowserRequest, layer),
callable = handler,
- args = (Resources, 'provideResource',
- name, IBrowserPresentation, factory, layer),
+ args = (zapi.servicenames.Presentation, 'provideResource',
+ name, IBrowserRequest, factory, layer),
)
def resourceDirectory(_context, name, directory, layer='default',
@@ -75,8 +75,8 @@
factory = DirectoryResourceFactory(directory, checker)
_context.action(
- discriminator = ('resource', name, IBrowserPresentation, layer),
+ discriminator = ('resource', name, IBrowserRequest, layer),
callable = handler,
- args = (Resources, 'provideResource',
- name, IBrowserPresentation, factory, layer),
+ args = (zapi.servicenames.Presentation, 'provideResource',
+ name, IBrowserRequest, factory, layer),
)
=== Zope3/src/zope/app/publisher/browser/viewmeta.py 1.33 => 1.34 ===
--- Zope3/src/zope/app/publisher/browser/viewmeta.py:1.33 Sun Sep 21 13:31:58 2003
+++ Zope3/src/zope/app/publisher/browser/viewmeta.py Fri Nov 21 12:10:30 2003
@@ -18,6 +18,7 @@
import os
+from zope.app import zapi
from zope.interface import implements, classImplements
from zope.publisher.interfaces.browser import IBrowserPublisher
@@ -28,9 +29,9 @@
from zope.configuration.exceptions import ConfigurationError
-from zope.app.services.servicenames import Interfaces, Views
+from zope.app.services.servicenames import Interfaces
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.interfaces.browser import IBrowserRequest
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.app.publisher.browser import BrowserView
@@ -155,7 +156,6 @@
if hasattr(class_, '__implements__'):
classImplements(new_class, IBrowserPublisher)
- classImplements(new_class, IBrowserPresentation)
else:
# template
@@ -173,10 +173,10 @@
defineChecker(new_class, Checker(required))
_context.action(
- discriminator = ('view', for_, name, IBrowserPresentation, layer),
+ discriminator = ('view', for_, name, IBrowserRequest, layer),
callable = handler,
- args = (Views, 'provideView',
- for_, name, IBrowserPresentation, [new_class], layer),
+ args = (zapi.servicenames.Presentation, 'provideView',
+ for_, name, IBrowserRequest, [new_class], layer),
)
if not usage and menu:
@@ -353,10 +353,10 @@
defineChecker(newclass, Checker(required))
_context.action(
- discriminator = ('view', for_, name, IBrowserPresentation, layer),
+ discriminator = ('view', for_, name, IBrowserRequest, layer),
callable = handler,
- args = (Views, 'provideView',
- for_, name, IBrowserPresentation, [newclass], layer),
+ args = (zapi.servicenames.Presentation, 'provideView',
+ for_, name, IBrowserRequest, [newclass], layer),
)
def addview(_context, name, permission,
@@ -375,9 +375,10 @@
def defaultView(_context, name, for_=None):
_context.action(
- discriminator = ('defaultViewName', for_, IBrowserPresentation, name),
+ discriminator = ('defaultViewName', for_, IBrowserRequest, name),
callable = handler,
- args = (Views,'setDefaultViewName', for_, IBrowserPresentation,
+ args = (zapi.servicenames.Presentation,'setDefaultViewName',
+ for_, IBrowserRequest,
name),
)
More information about the Zope3-Checkins
mailing list