[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser -
metaconfigure.py:1.14 metadirectives.py:1.8
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:10:28 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv30617/src/zope/app/publisher/browser
Modified Files:
metaconfigure.py metadirectives.py
Log Message:
Provided a directive for defining layers.
=== Zope3/src/zope/app/publisher/browser/metaconfigure.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/publisher/browser/metaconfigure.py:1.13 Fri Aug 15 20:43:46 2003
+++ Zope3/src/zope/app/publisher/browser/metaconfigure.py Fri Nov 21 12:10:27 2003
@@ -16,10 +16,11 @@
$Id$
"""
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.app import zapi
+from zope.publisher.interfaces.browser import IBrowserRequest
from zope.app.services.servicenames import Interfaces
-from zope.app.component.metaconfigure import skin as _skin
+from zope.app.component.metaconfigure import skin, layer
from zope.app.component.metaconfigure import handler
# referred to through ZCML
@@ -29,20 +30,18 @@
from zope.app.publisher.browser.viewmeta import view
-def skin(_context, **__kw):
- return _skin(_context, type=IBrowserPresentation, **__kw)
-
def defaultView(_context, name, for_=None, **__kw):
if __kw:
view(_context, name=name, for_=for_, **__kw)()
- type = IBrowserPresentation
+ type = IBrowserRequest
_context.action(
discriminator = ('defaultViewName', for_, type, name),
callable = handler,
- args = ('Views','setDefaultViewName', for_, type, name),
+ args = (zapi.servicenames.Presentation,
+ 'setDefaultViewName', for_, type, name),
)
if for_ is not None:
=== Zope3/src/zope/app/publisher/browser/metadirectives.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/publisher/browser/metadirectives.py:1.7 Mon Oct 6 18:08:53 2003
+++ Zope3/src/zope/app/publisher/browser/metadirectives.py Fri Nov 21 12:10:27 2003
@@ -472,9 +472,18 @@
# misc. directives
#
-class ISkinDirective(Interface):
+class ILayerDirective(Interface):
+ """Defines a browser layer
"""
- Defines a browser skin
+
+ name = TextLine(
+ title=u"Name",
+ description=u"The name of the skin.",
+ required=True
+ )
+
+class ISkinDirective(Interface):
+ """Defines a browser skin
"""
name = TextLine(
More information about the Zope3-Checkins
mailing list