[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser -
i18nresourcemeta.py:1.15 icon.py:1.12 meta.zcml:1.14
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:10:26 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv30578/src/zope/app/publisher/browser
Modified Files:
i18nresourcemeta.py icon.py meta.zcml
Log Message:
Use the presentation service and register by request
=== Zope3/src/zope/app/publisher/browser/i18nresourcemeta.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/publisher/browser/i18nresourcemeta.py:1.14 Sun Aug 17 02:07:32 2003
+++ Zope3/src/zope/app/publisher/browser/i18nresourcemeta.py Fri Nov 21 12:10:25 2003
@@ -20,16 +20,17 @@
from zope.security.checker import CheckerPublic, Checker
from zope.configuration.exceptions import ConfigurationError
-from zope.app.services.servicenames import Resources
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.app.services.servicenames import Presentation
from zope.app.component.metaconfigure import handler
from zope.app.publisher.fileresource import File, Image
from i18nfileresource import I18nFileResourceFactory
+from zope.publisher.interfaces.browser import IBrowserRequest
+
class I18nResource(object):
- type = IBrowserPresentation
+ type = IBrowserRequest
default_allowed_attributes = '__call__'
def __init__(self, _context, name=None, defaultLanguage='en',
@@ -102,7 +103,7 @@
self._context.action(
discriminator = ('i18n-resource', self.name, self.type, self.layer),
callable = handler,
- args = (Resources, 'provideResource', self.name, self.type,
+ args = (Presentation, 'provideResource', self.name, self.type,
factory, self.layer)
)
=== Zope3/src/zope/app/publisher/browser/icon.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/publisher/browser/icon.py:1.11 Fri Aug 15 20:43:46 2003
+++ Zope3/src/zope/app/publisher/browser/icon.py Fri Nov 21 12:10:25 2003
@@ -20,10 +20,11 @@
import os
import re
+from zope.app import zapi
from zope.app.component.metaconfigure import handler
from zope.app.publisher.browser import metaconfigure
from zope.app.traversing.namespace import getResourceInContext
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.interfaces.browser import IBrowserRequest
from zope.configuration.exceptions import ConfigurationError
from zope.app.services.servicenames import Interfaces
@@ -94,8 +95,8 @@
_context.action(
discriminator = ('view', name, vfactory, layer),
callable = handler,
- args = ('Views', 'provideView',
- for_, name, IBrowserPresentation,
+ args = (zapi.servicenames.Presentation, 'provideView',
+ for_, name, IBrowserRequest,
vfactory, layer)
)
_context.action(
=== Zope3/src/zope/app/publisher/browser/meta.zcml 1.13 => 1.14 ===
--- Zope3/src/zope/app/publisher/browser/meta.zcml:1.13 Mon Aug 11 10:58:07 2003
+++ Zope3/src/zope/app/publisher/browser/meta.zcml Fri Nov 21 12:10:25 2003
@@ -129,6 +129,12 @@
<!-- misc. directives -->
<meta:directive
+ name="layer"
+ schema=".metadirectives.ILayerDirective"
+ handler=".metaconfigure.layer"
+ />
+
+ <meta:directive
name="skin"
schema=".metadirectives.ISkinDirective"
handler=".metaconfigure.skin"
More information about the Zope3-Checkins
mailing list