[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/ Backport
rev26612-13.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Aug 11 16:47:15 EDT 2004
Log message for revision 27036:
Backport rev26612-13.
Changed:
U Zope3/branches/ZopeX3-3.0/src/zope/app/container/browser/metaconfigure.py
U Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/metadirectives.py
U Zope3/branches/ZopeX3-3.0/src/zope/app/onlinehelp/metadirectives.py
U Zope3/branches/ZopeX3-3.0/src/zope/configuration/config.py
U Zope3/branches/ZopeX3-3.0/src/zope/configuration/fields.py
U Zope3/branches/ZopeX3-3.0/src/zope/configuration/xmlconfig.py
U Zope3/branches/ZopeX3-3.0/src/zope/configuration/zopeconfigure.py
-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/container/browser/metaconfigure.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/container/browser/metaconfigure.py 2004-08-11 20:42:09 UTC (rev 27035)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/container/browser/metaconfigure.py 2004-08-11 20:47:15 UTC (rev 27036)
@@ -11,10 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""
+"""Container-specific ``browser`` ZCML namespace directive handlers
+
$Id$
"""
-
+__docformat__ = 'restructuredtext'
from zope.interface import Interface
from zope.configuration.fields import GlobalObject
from zope.schema import Id
@@ -25,7 +26,7 @@
from zope.app.security.fields import Permission
class IContainerViews(Interface):
- """Define a container views"""
+ """Define several container views for an ``IContainer`` implementation."""
for_ = GlobalObject(
title=u"The interface this containerViews are for.",
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/metadirectives.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/metadirectives.py 2004-08-11 20:42:09 UTC (rev 27035)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/i18n/metadirectives.py 2004-08-11 20:47:15 UTC (rev 27036)
@@ -11,13 +11,16 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""
+"""``i18n`` ZCML namespace directive interfaces
+
$Id$
"""
+__docformat__ = 'restructuredtext'
from zope.interface import Interface
from zope.configuration.fields import Path
class IRegisterTranslationsDirective(Interface):
+ """Register translations with the global Translation Service."""
directory = Path(
title=u"Directory",
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/onlinehelp/metadirectives.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/onlinehelp/metadirectives.py 2004-08-11 20:42:09 UTC (rev 27035)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/onlinehelp/metadirectives.py 2004-08-11 20:47:15 UTC (rev 27036)
@@ -11,17 +11,21 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Schemas for the 'help' ZCML namespace
+"""Schemas for the ``help`` ZCML namespace
$Id$
"""
+__docformat__ = 'restructuredtext'
from zope.configuration.fields import GlobalObject, Path, MessageID, Tokens
from zope.interface import Interface
from zope.schema import BytesLine, TextLine
class IRegisterDirective(Interface):
- """Register directive for onlien help topics."""
+ """Register an online topic.
+ Optionally you can register a topic for a component and view.
+ """
+
id = BytesLine(
title=u"Topic Id",
description=u"Id of the topic as it will appear in the URL.",
@@ -57,7 +61,7 @@
resources = Tokens(
title=u"A list of resources.",
- description=u"""
+ description=u"""\
A list of resources which shall be user for the Help Topic.
The resources must be located in the same directory as
the Help Topic definition.
Modified: Zope3/branches/ZopeX3-3.0/src/zope/configuration/config.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/configuration/config.py 2004-08-11 20:42:09 UTC (rev 27035)
+++ Zope3/branches/ZopeX3-3.0/src/zope/configuration/config.py 2004-08-11 20:47:15 UTC (rev 27036)
@@ -17,7 +17,7 @@
$Id$
"""
-
+__docformat__ = 'restructuredtext'
import os.path
import sys
import sets
Modified: Zope3/branches/ZopeX3-3.0/src/zope/configuration/fields.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/configuration/fields.py 2004-08-11 20:42:09 UTC (rev 27035)
+++ Zope3/branches/ZopeX3-3.0/src/zope/configuration/fields.py 2004-08-11 20:47:15 UTC (rev 27036)
@@ -15,6 +15,7 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
import os, re, warnings
from zope import schema
from zope.schema.interfaces import IFromUnicode
@@ -79,6 +80,7 @@
Examples:
First, we need to set up a stub name resolver:
+
>>> d = {'x': 1, 'y': 42, 'z': 'zope'}
>>> class fakeresolver(dict):
... def resolve(self, n):
Modified: Zope3/branches/ZopeX3-3.0/src/zope/configuration/xmlconfig.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/configuration/xmlconfig.py 2004-08-11 20:42:09 UTC (rev 27035)
+++ Zope3/branches/ZopeX3-3.0/src/zope/configuration/xmlconfig.py 2004-08-11 20:47:15 UTC (rev 27036)
@@ -19,6 +19,7 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
import errno
import os
import sys
@@ -288,7 +289,13 @@
return fp
class IInclude(Interface):
+ """The ``zope:include`` directive
+ This directive allows you to include another ZCML file in the
+ configuration. This enables you to write configuration files in each
+ package and then link them together.
+ """
+
file = schema.BytesLine(
title=u"Configuration file name",
description=u"The name of a configuration file to be included, "
@@ -305,14 +312,14 @@
containing the including configuration file. The pattern can
include:
- ``*`` matches 0 or more characters
+ - ``*`` matches 0 or more characters
+
+ - ``?`` matches a single character
+
+ - ``[<seq>]`` matches any character in seq
+
+ - ``[!<seq>]`` matches any character not in seq
- ``?`` matches a single character
-
- [*seq*] matches any character in seq
-
- [!*seq*] matches any character not in seq
-
The file names are included in sorted order, where sorting is
without regard to case.
""",
Modified: Zope3/branches/ZopeX3-3.0/src/zope/configuration/zopeconfigure.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/configuration/zopeconfigure.py 2004-08-11 20:42:09 UTC (rev 27035)
+++ Zope3/branches/ZopeX3-3.0/src/zope/configuration/zopeconfigure.py 2004-08-11 20:47:15 UTC (rev 27036)
@@ -99,14 +99,25 @@
$Id$
"""
-
+__docformat__ = 'restructuredtext'
import os
import zope.configuration.config as config
from zope import schema
from zope.interface import Interface
class IZopeConfigure(Interface):
+ """The ``zope:configure`` Directive
+ The zope configuration directive is a pure grouping directive. It
+ doesn't compute any actions on it's own. Instead, it allows a package to
+ be specified, affecting the interpretation of relative dotted names and
+ file paths. It also allows an i18n domain to be specified. The
+ information collected is used by subdirectives.
+
+ It may seem that this directive can only be used once per file, but it can
+ be applied whereever it is convenient.
+ """
+
package = config.fields.GlobalObject(
title=u"Package",
description=u"The package to be used for evaluating relative imports "
@@ -123,7 +134,9 @@
u"used by a project.",
required=False)
+
class ZopeConfigure(config.GroupingContextDecorator):
+ __doc__ = __doc__
def __init__(self, context, **kw):
super(ZopeConfigure, self).__init__(context, **kw)
@@ -131,3 +144,4 @@
# if we have a package, we want to also define basepath
# so we don't acquire one
self.basepath = os.path.split(self.package.__file__)[0]
+
More information about the Zope3-Checkins
mailing list