[Checkins] SVN: zope.preference/trunk/ fix namespace

Michael Howitz mh at gocept.com
Fri Jun 11 13:41:02 EDT 2010


Log message for revision 113365:
  fix namespace
  
  

Changed:
  U   zope.preference/trunk/CHANGES.txt
  U   zope.preference/trunk/README.txt
  U   zope.preference/trunk/setup.py
  D   zope.preference/trunk/src/zope/__init__.py
  A   zope.preference/trunk/src/zope/__init__.py
  D   zope.preference/trunk/src/zope/app/
  A   zope.preference/trunk/src/zope/preference/
  D   zope.preference/trunk/src/zope/preference/browser.py
  D   zope.preference/trunk/src/zope/preference/ftesting.zcml
  D   zope.preference/trunk/src/zope/preference/index.pt
  D   zope.preference/trunk/src/zope/preference/macros.pt
  D   zope.preference/trunk/src/zope/preference/menu.pt
  D   zope.preference/trunk/src/zope/preference/subgroup.pt
  D   zope.preference/trunk/src/zope/preference/testing.py
  D   zope.preference/trunk/src/zope/preference/zmi.txt

-=-
Modified: zope.preference/trunk/CHANGES.txt
===================================================================
--- zope.preference/trunk/CHANGES.txt	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/CHANGES.txt	2010-06-11 17:41:02 UTC (rev 113365)
@@ -2,50 +2,8 @@
 CHANGES
 =======
 
-3.7.1 (unreleased)
+3.8.0 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Split out from `zope.app.preference`.
 
-
-3.7.0 (2010-06-11)
-------------------
-
-- Added HTML labels to ZMI forms.
-
-- Removed `edit.pt` as it seems to be unused.
-
-- Added tests for the ZMI views.
-
-
-3.6.0 (2009-02-01)
-------------------
-
-- Use ``zope.container`` instead of ``zope.app.container``.
-
-
-3.5.0 (2009-01-17)
-------------------
-
-- Got rid of ``zope.app.zapi`` dependency, replacing its uses with direct
-  imports from original places.
-
-- Change mailing address from zope3-dev to zope-dev, as the first one
-  is retired now.
-
-- Fix tests for python 2.6.
-
-- Remove zpkg stuff and zcml include files for
-  old mkzopeinstance-based instances.
-
-
-3.4.1 (2007-10-30)
-------------------
-
-- Avoid deprecation warnings for ``ZopeMessageFactory``.
-
-
-3.4.0 (2007-10-25)
-------------------
-
-- Initial release independent of the main Zope tree.

Modified: zope.preference/trunk/README.txt
===================================================================
--- zope.preference/trunk/README.txt	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/README.txt	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,2 +1,2 @@
-This package provides and API and UI to create and maintain hierarchical user
+This package provides and API to create and maintain hierarchical user
 preferences. Preferences can be easily created by defining schemas.

Modified: zope.preference/trunk/setup.py
===================================================================
--- zope.preference/trunk/setup.py	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/setup.py	2010-06-11 17:41:02 UTC (rev 113365)
@@ -16,7 +16,7 @@
 # When developing and releasing this package, please follow the documented
 # Zope Toolkit policies as described by this documentation.
 ##############################################################################
-"""Setup for zope.app.preference package
+"""Setup for zope.preference package
 
 $Id$
 """
@@ -26,22 +26,22 @@
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-setup(name = 'zope.app.preference',
-      version='3.7.1dev',
+setup(name = 'zope.preference',
+      version='3.8.0dev',
       author='Zope Corporation and Contributors',
       author_email='zope-dev at zope.org',
       description='User Preferences Framework',
       long_description=(
           read('README.txt')
           + '\n\n' +
-          'Detailed Dcoumentation\n' +
+          'Detailed Documentation\n' +
           '======================\n'
           + '\n\n' +
-          read('src', 'zope', 'app', 'preference', 'README.txt')
+          read('src', 'zope', 'preference', 'README.txt')
           + '\n\n' +
           read('CHANGES.txt')
           ),
-      keywords = "zope3 user preference",
+      keywords = "bluebream zope zope3 user preference",
       classifiers = [
           'Development Status :: 5 - Production/Stable',
           'Environment :: Web Environment',
@@ -52,11 +52,11 @@
           'Operating System :: OS Independent',
           'Topic :: Internet :: WWW/HTTP',
           'Framework :: Zope3'],
-      url='http://pypi.python.org/pypi/zope.app.preference',
+      url='http://pypi.python.org/pypi/zope.preference',
       license='ZPL 2.1',
       packages=find_packages('src'),
       package_dir = {'': 'src'},
-      namespace_packages=['zope', 'zope.app'],
+      namespace_packages=['zope'],
       extras_require=dict(test=[
           'zope.app.testing',
           'zope.app.zcmlfiles',

Deleted: zope.preference/trunk/src/zope/__init__.py
===================================================================
--- zope.preference/trunk/src/zope/__init__.py	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/__init__.py	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,7 +0,0 @@
-# this is a namespace package
-try:
-    import pkg_resources
-    pkg_resources.declare_namespace(__name__)
-except ImportError:
-    import pkgutil
-    __path__ = pkgutil.extend_path(__path__, __name__)

Copied: zope.preference/trunk/src/zope/__init__.py (from rev 113364, zope.preference/trunk/src/zope/app/__init__.py)
===================================================================
--- zope.preference/trunk/src/zope/__init__.py	                        (rev 0)
+++ zope.preference/trunk/src/zope/__init__.py	2010-06-11 17:41:02 UTC (rev 113365)
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)

Deleted: zope.preference/trunk/src/zope/preference/browser.py
===================================================================
--- zope.preference/trunk/src/zope/app/preference/browser.py	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/preference/browser.py	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,106 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""User Preferences Browser Views
-
-$Id$
-"""
-__docformat__ = 'restructuredtext'
-
-import re
-import zope.component
-import zope.interface
-import zope.schema
-from zope.container.interfaces import IObjectFindFilter
-from zope.i18n import translate
-from zope.i18nmessageid import Message
-from zope.security.proxy import removeSecurityProxy
-from zope.traversing.api import getParent, getRoot
-
-from zope.app.basicskin.standardmacros import StandardMacros
-from zope.app.form.browser.editview import EditView
-from zope.app.pagetemplate.simpleviewclass import simple
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.app.tree.browser.cookie import CookieTreeView
-from zope.i18nmessageid import ZopeMessageFactory as _
-
-from zope.app.preference import interfaces
-
-
-NoneInterface = zope.interface.interface.InterfaceClass('None')
-
-class PreferencesMacros(StandardMacros):
-    """Page Template METAL macros for preferences"""
-    macro_pages = ('preference_macro_definitions',)
-
-
-class PreferenceGroupFilter(object):
-    """A special filter for """
-    zope.interface.implements(IObjectFindFilter)
-
-    def matches(self, obj):
-        """Decide whether the object is shown in the tree."""
-        if interfaces.IPreferenceCategory.providedBy(obj):
-            return True
-
-        if interfaces.IPreferenceGroup.providedBy(obj):
-            parent = getParent(obj)
-            if interfaces.IPreferenceCategory.providedBy(parent):
-                return True
-
-        return False
-
-
-class PreferencesTree(CookieTreeView):
-    """Preferences Tree using the stateful cookie tree."""
-
-    def tree(self):
-        root = getRoot(self.context)
-        filter = PreferenceGroupFilter()
-        return self.cookieTree(root, filter)
-
-pref_msg = _("${name} Preferences")
-
-class EditPreferenceGroup(EditView):
-
-    def __init__(self, context, request):
-        self.__used_for__ = removeSecurityProxy(context.__schema__)
-        self.schema = removeSecurityProxy(context.__schema__)
-
-        if self.schema is None:
-            self.schema = NoneInterface
-            zope.interface.alsoProvides(removeSecurityProxy(context),
-                                        NoneInterface)
-
-        name = translate(context.__title__, context=request,
-                         default=context.__title__)
-        self.label = Message(pref_msg, mapping={u'name': name})
-        super(EditPreferenceGroup, self).__init__(context, request)
-        self.setPrefix(context.__id__)
-
-    def getIntroduction(self):
-        text = self.context.__description__ or self.schema.__doc__
-        text = translate(text, context=self.request, default=text)
-
-        # Determine common whitespace ...
-        cols = len(re.match('^[ ]*', text).group())
-        # ... and clean it up.
-        text = re.sub('\n[ ]{%i}' %cols, '\n', text).strip()
-
-        if not text:
-            return u''
-
-        # Render the description as ReST.
-        source = zope.component.createObject('zope.source.rest', text)
-        renderer = zope.component.getMultiAdapter((source, self.request))
-        return renderer.render()

Deleted: zope.preference/trunk/src/zope/preference/ftesting.zcml
===================================================================
--- zope.preference/trunk/src/zope/app/preference/ftesting.zcml	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/preference/ftesting.zcml	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,13 +0,0 @@
-<configure xmlns="http://namespaces.zope.org/zope">
-
-  <!-- This file is the equivalent of site.zcml and it is -->
-  <!-- used for functional testing setup -->
-
-  <include package="zope.app.zcmlfiles" />
-  <include package="zope.app.tree" />
-  <include package="zope.app.renderer" />
-
-  <include package="zope.app.preference" file="meta.zcml"/>
-  <include package="zope.app.preference" />
-
-</configure>

Deleted: zope.preference/trunk/src/zope/preference/index.pt
===================================================================
--- zope.preference/trunk/src/zope/app/preference/index.pt	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/preference/index.pt	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,26 +0,0 @@
-<html metal:use-macro="context/@@preferences_macros/pref_view">
-
-<div metal:fill-slot="body">
-
-  <form action="." tal:attributes="action request/URL" method="post"
-        enctype="multipart/form-data">
-
-  <div metal:use-macro="context/@@preferences_macros/edit_pref_group" />
-
-  <table class="prefs" cellspacing="0" cellpadding="0">
-    <tr><td class="spacer"></td></tr>
-    <tr>
-      <td colspan="2" class="controls">
-        <input type="submit" value="Refresh" 
-            i18n:attributes="value refresh-button" />
-        <input type="submit" name="UPDATE_SUBMIT" value="Change" 
-            i18n:attributes="value submit-button"/>
-      </td>
-    </tr>
-  </table>
-
-  </form>
-
-</div>
-
-</html>

Deleted: zope.preference/trunk/src/zope/preference/macros.pt
===================================================================
--- zope.preference/trunk/src/zope/app/preference/macros.pt	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/preference/macros.pt	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,155 +0,0 @@
-<metal:block define-macro="tree">
-
-<table cellspacing="0" cellpadding="0"
-       tal:define="root           context/@@tree;
-                   result         root/getFlatDicts;
-                   nodeDictList   python:result[0];
-                   maxDepth       python:result[1]">
-
-<tr>
-  <td class="list-item"
-      tal:attributes="colspan python:maxDepth+2">
-    Preferences
-  </td>
-</tr>
-
-<tr tal:repeat="nodeInfo nodeDictList">
-<tal:block tal:define="node nodeInfo/node">
-
-  <td style="width:16px" tal:repeat="state nodeInfo/row-state">
-    <img tal:attributes="src context/++resource++tree_images/vline.png"
-         tal:condition="state" alt="|" border="0" />
-  </td>
-
-  <td style="width:16px">
-    <a href=""
-       tal:attributes="href string:?tree-state=${nodeInfo/tree-state}"
-       tal:condition="node/hasChildren">
-      <tal:block condition="not:nodeInfo/last-level-node">
-        <img tal:attributes="src context/++resource++tree_images/plus_vline.png"
-             tal:condition="not:node/expanded" alt="+" border="0" />
-        <img tal:attributes="src context/++resource++tree_images/minus_vline.png"
-             tal:condition="node/expanded" alt="-" border="0" />
-      </tal:block>
-      <tal:block condition="nodeInfo/last-level-node">
-        <img tal:attributes="src context/++resource++tree_images/plus.png"
-             tal:condition="not:node/expanded" alt="+" border="0" />
-        <img tal:attributes="src context/++resource++tree_images/minus.png"
-             tal:condition="node/expanded" alt="-" border="0" />
-      </tal:block>
-    </a>
-    <tal:block condition="not:node/hasChildren">
-      <img tal:attributes="src context/++resource++tree_images/tline.png"
-           tal:condition="not:nodeInfo/last-level-node" alt="" border="0" />
-      <img tal:attributes="src context/++resource++tree_images/lline.png"
-           tal:condition="nodeInfo/last-level-node" alt="" border="0" />
-    </tal:block>
-  </td>
-
-  <td class="list-item"
-      tal:attributes="colspan python:maxDepth-len(nodeInfo['row-state'])+1">
-    &nbsp;<a href=""
-       tal:attributes="href
-           string:${node/context/@@absolute_url}/@@index.html"
-       tal:content="node/context/zope:name">
-      node/id
-    </a>
-  </td>
-
-</tal:block>
-</tr>
-
-</table>
-
-</metal:block>
-
-
-<metal:block define-macro="pref_view">
-
-<html metal:use-macro="context/@@standard_macros/view">
-<body>
-
-<div id="navigators" metal:fill-slot="navigators">
- <div class="box">
-   <h4>Preferences</h4>
-   <div class="body">
-    <metal:block use-macro="context/@@preferences_macros/tree" />
-   </div>
- </div>
-</div>
-
-<div metal:fill-slot="tabs">
-  <h1 tal:content="context/__title__">User Preferences</h1>
-</div>
-
-<div metal:fill-slot="body">
-
-  <div metal:define-slot="body">
-     <p>Body here</p>
-  </div>
-
-</div>
-
-</body>
-
-</html>
-</metal:block>
-
-
-<metal:block define-macro="edit_pref_group">
-
-  <div tal:content="structure view/getIntroduction">
-    Category Description goes here.
-  </div>
-  <br/>
-
-  <p tal:define="status view/update"
-     tal:condition="status"
-     tal:content="status" />
-
-  <p tal:condition="view/errors" i18n:translate="">
-    There are <strong tal:content="python:len(view.errors)"
-                      i18n:name="num_errors">6</strong> input errors.
-  </p>
-
-  <table class="listing" width="90%" cellspacing="0" cellpadding="0"
-         tal:condition="view/widgets">
-
-    <thead>
-      <tr>
-        <th i18n:translate="">Description</th>
-        <th i18n:translate="">Value</th>
-      </tr>
-    </thead>
-
-    <tal:block repeat="widget view/widgets" >
-    <tr class=""
-        tal:define="oddrow repeat/widget/odd;
-                    firstrow repeat/widget/start"
-        tal:attributes="class python:oddrow and 'even' or 'odd'">
-      <td class="description">
-        <label tal:attributes="for widget/name">
-          <b tal:content="widget/label">Option</b>
-          <div class="indent small">
-            <div tal:content="widget/hint">
-              Explanation
-            </div>
-            <div class="error" tal:define="error widget/error"
-                 tal:condition="error" tal:content="structure error">
-              The Error
-            </div>
-          </div>
-        </label>
-      </td>
-      <td class="input" tal:content="structure widget">
-        <input type="text" style="width:100%"/>
-      </td>
-    </tr>
-    </tal:block>
-  </table>
-
-  <div tal:repeat="subgroup context/values">
-    <tal:block replace="structure subgroup/@@editAsSubGroup" />
-  </div>
-
-</metal:block>

Deleted: zope.preference/trunk/src/zope/preference/menu.pt
===================================================================
--- zope.preference/trunk/src/zope/app/preference/menu.pt	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/preference/menu.pt	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,20 +0,0 @@
-<html metal:use-macro="views/apidoc_macros/menu"
-    i18n:domain="zope">
-<body>
-
-  <div class="menu" metal:fill-slot="menu-title" i18n:translate="">
-    Preferences
-  </div>
-
-  <div metal:fill-slot="menu" class="small">
-    <ul>
-      <li tal:repeat="group context/values">
-        <a href="" target="main"
-           tal:attributes="href string:./${group/name}/edit.html" 
-           tal:content="group/title" />
-      </li>
-    </ul>
-  </div>
-
-</body>
-</html>

Deleted: zope.preference/trunk/src/zope/preference/subgroup.pt
===================================================================
--- zope.preference/trunk/src/zope/app/preference/subgroup.pt	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/preference/subgroup.pt	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,6 +0,0 @@
-<fieldset>
-  <legend tal:content="context/__title__">Title</legend>
-
-  <div metal:use-macro="context/@@preferences_macros/edit_pref_group" />
-
-</fieldset>
\ No newline at end of file

Deleted: zope.preference/trunk/src/zope/preference/testing.py
===================================================================
--- zope.preference/trunk/src/zope/app/preference/testing.py	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/preference/testing.py	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,26 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""zope.app.preferences common test related classes/functions/objects.
-
-$Id$
-"""
-
-__docformat__ = "reStructuredText"
-
-import os
-from zope.app.testing.functional import ZCMLLayer
-
-PreferencesLayer = ZCMLLayer(
-    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
-    __name__, 'PreferencesLayer', allow_teardown=True)

Deleted: zope.preference/trunk/src/zope/preference/zmi.txt
===================================================================
--- zope.preference/trunk/src/zope/app/preference/zmi.txt	2010-06-11 17:27:42 UTC (rev 113364)
+++ zope.preference/trunk/src/zope/preference/zmi.txt	2010-06-11 17:41:02 UTC (rev 113365)
@@ -1,153 +0,0 @@
-=======
-Browser
-=======
-
-This package also provides a user interface, so the user can edit the
-preferences.
-
-Set up
-------
-
-To show the user interface functions we need some setup beforehand:
-
-  >>> from zope.testbrowser.testing import Browser
-  >>> browser = Browser()
-
-As the preferences cannot be defined through the web we have to define
-them in python code:
-
-  >>> import zope.interface
-  >>> import zope.schema
-  >>> class IZMIUserSettings(zope.interface.Interface):
-  ...     """Basic User Preferences"""
-  ...
-  ...     email = zope.schema.TextLine(
-  ...         title=u"E-mail Address",
-  ...         description=u"E-mail Address used to send notifications")
-  ...
-  ...     skin = zope.schema.Choice(
-  ...         title=u"Skin",
-  ...         description=u"The skin that should be used for the ZMI.",
-  ...         values=['Rotterdam', 'ZopeTop', 'Basic'],
-  ...         default='Rotterdam')
-  ...
-  ...     showZopeLogo = zope.schema.Bool(
-  ...         title=u"Show Zope Logo",
-  ...         description=u"Specifies whether Zope logo should be displayed "
-  ...                     u"at the top of the screen.",
-  ...         default=True)
-
-The preference schema is usually registered using a ZCML statement:
-
-  >>> from zope.configuration import xmlconfig
-  >>> import zope.app.preference
-  >>> context = xmlconfig.file('meta.zcml', zope.app.preference)
-
-  >>> context = xmlconfig.string('''
-  ...     <configure
-  ...         xmlns="http://namespaces.zope.org/zope"
-  ...         i18n_domain="test">
-  ...
-  ...       <preferenceGroup
-  ...           id="ZMISettings"
-  ...           title="ZMI Settings"
-  ...           schema="zope.app.preference.zmi.IZMIUserSettings"
-  ...           category="true"
-  ...           />
-  ...
-  ...     </configure>''', context)
-
-Editing Preferences
--------------------
-
-The preferences are accessable in the ``++preferences++`` namespace:
-
-  >>> browser.open('http://localhost/++preferences++')
-
-The page shows a form which allows editing the preference values:
-
-  >>> browser.getControl('E-mail').value = 'hans at example.com'
-  >>> browser.getControl('Skin').displayOptions
-  ['Rotterdam', 'ZopeTop', 'Basic']
-  >>> browser.getControl('Skin').displayValue = ['ZopeTop']
-  >>> browser.getControl('Show Zope Logo').selected
-  True
-  >>> browser.getControl('Show Zope Logo').click()
-
-After selecting `Change` the values get persisted:
-
-  >>> browser.getControl('Change').click()
-  >>> browser.url
-  'http://localhost/++preferences++/@@index.html'
-  >>> browser.getControl('E-mail').value
-  'hans at example.com'
-  >>> browser.getControl('Skin').displayValue
-  ['ZopeTop']
-  >>> browser.getControl('Show Zope Logo').selected
-  False
-
-The preference group is shown in a tree. It has a link to the form:
-
-  >>> browser.getLink('ZMISettings').click()
-  >>> browser.url
-  'http://localhost/++preferences++/ZMISettings/@@index.html'
-  >>> browser.getControl('E-mail').value
-  'hans at example.com'
-
-
-Preference Group Trees
-----------------------
-
-The preferences would not be very powerful, if you could create a full
-preferences. So let's create a sub-group for our ZMI user settings, where we
-can adjust the look and feel of the folder contents view:
-
-  >>> class IFolderSettings(zope.interface.Interface):
-  ...     """Basic Folder Settings"""
-  ...
-  ...     shownFields = zope.schema.Set(
-  ...         title=u"Shown Fields",
-  ...         description=u"Fields shown in the table.",
-  ...         value_type=zope.schema.Choice(['name', 'size', 'creator']),
-  ...         default=set(['name', 'size']))
-  ...
-  ...     sortedBy = zope.schema.Choice(
-  ...         title=u"Sorted By",
-  ...         description=u"Data field to sort by.",
-  ...         values=['name', 'size', 'creator'],
-  ...         default='name')
-
-And register it:
-
-  >>> context = xmlconfig.string('''
-  ...     <configure
-  ...         xmlns="http://namespaces.zope.org/zope"
-  ...         i18n_domain="test">
-  ...
-  ...       <preferenceGroup
-  ...           id="ZMISettings.Folder"
-  ...           title="Folder Content View Settings"
-  ...           schema="zope.app.preference.zmi.IFolderSettings"
-  ...           />
-  ...
-  ...     </configure>''', context)
-
-The sub-group is displayed inside the parent group as a form:
-
-  >>> browser.reload()
-  >>> browser.getControl('Shown Fields').displayOptions
-  ['name', 'size', 'creator']
-  >>> browser.getControl('Shown Fields').displayValue
-  ['name', 'size']
-  >>> browser.getControl('Shown Fields').displayValue = ['size', 'creator']
-  >>> browser.getControl('Sorted By').displayOptions
-  ['name', 'size', 'creator']
-  >>> browser.getControl('Sorted By').displayValue = ['creator']
-
-Selecing `Change` persists these values, too:
-
-  >>> browser.getControl('Change').click()
-  >>> browser.getControl('Shown Fields').displayValue
-  ['size', 'creator']
-  >>> browser.getControl('Sorted By').displayValue
-  ['creator']



More information about the checkins mailing list