[Checkins] SVN: zamplugin.sampledata/ Move implementation form
private repos to svn.zope.org
Roger Ineichen
roger at projekt01.ch
Sat Feb 16 11:20:23 EST 2008
Log message for revision 83910:
Move implementation form private repos to svn.zope.org
Changed:
A zamplugin.sampledata/branches/
A zamplugin.sampledata/tags/
A zamplugin.sampledata/trunk/
A zamplugin.sampledata/trunk/CHANGES.txt
A zamplugin.sampledata/trunk/README.txt
A zamplugin.sampledata/trunk/bootstrap.py
A zamplugin.sampledata/trunk/buildout.cfg
A zamplugin.sampledata/trunk/externals/
A zamplugin.sampledata/trunk/setup.py
A zamplugin.sampledata/trunk/src/
A zamplugin.sampledata/trunk/src/zamplugin/
A zamplugin.sampledata/trunk/src/zamplugin/__init__.py
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/README.txt
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/__init__.py
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.py
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.zcml
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/configure.zcml
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/ftesting.zcml
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/generatesample.pt
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/generator.pt
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/interfaces.py
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.py
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.zcml
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.py
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.zcml
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/sampledata.pt
A zamplugin.sampledata/trunk/src/zamplugin/sampledata/tests.py
-=-
Added: zamplugin.sampledata/trunk/CHANGES.txt
===================================================================
--- zamplugin.sampledata/trunk/CHANGES.txt (rev 0)
+++ zamplugin.sampledata/trunk/CHANGES.txt 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,8 @@
+=======
+CHANGES
+=======
+
+Version 0.5.0 (unreleased)
+-------------------------
+
+- Initial Release
Property changes on: zamplugin.sampledata/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/README.txt
===================================================================
--- zamplugin.sampledata/trunk/README.txt (rev 0)
+++ zamplugin.sampledata/trunk/README.txt 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,2 @@
+This package provides sampledata manager views for ZAM (Zope 3 Application
+Management).
Property changes on: zamplugin.sampledata/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/bootstrap.py
===================================================================
--- zamplugin.sampledata/trunk/bootstrap.py (rev 0)
+++ zamplugin.sampledata/trunk/bootstrap.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation 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.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 75940 2007-05-24 14:45:00Z srichter $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Property changes on: zamplugin.sampledata/trunk/bootstrap.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/buildout.cfg
===================================================================
--- zamplugin.sampledata/trunk/buildout.cfg (rev 0)
+++ zamplugin.sampledata/trunk/buildout.cfg 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,272 @@
+[buildout]
+develop = .
+ externals/z3c.menu.ready2go
+ externals/zam.api
+ externals/zam.skin
+
+parts = app test checker coverage
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = zamplugin.sampledata [app, test]
+
+[checker]
+recipe = lovely.recipe:importchecker
+path = src/zamplugin/sampledata
+
+[coverage]
+recipe = zc.recipe.egg
+eggs = z3c.coverage
+
+
+[app]
+recipe = z3c.recipe.dev:app
+eggs = zamplugin.sampledata [app]
+server = zserver
+zope.conf =
+ ${var:zconfig}
+
+ interrupt-check-interval 50
+
+ <server>
+ type WSGI-HTTP
+ address 8080
+ </server>
+
+ <eventlog>
+ <logfile>
+ path access.log
+ </logfile>
+ <logfile>
+ path STDOUT
+ formatter zope.exceptions.log.Formatter
+ </logfile>
+ </eventlog>
+
+ <accesslog>
+ <logfile>
+ path access.log
+ </logfile>
+ <logfile>
+ path STDOUT
+ </logfile>
+ </accesslog>
+
+ devmode on
+
+site.zcml =
+ <configure
+ xmlns:meta="http://namespaces.zope.org/meta"
+ xmlns:browser="http://namespaces.zope.org/browser"
+ i18n_domain="zope">
+
+ <!-- Turn on the devmode -->
+ <meta:provides feature="devmode" />
+
+ <!-- load meta configuration for exclude -->
+ <include package="zc.configuration" file="meta.zcml" />
+
+ <!-- exclude will prevent from include -->
+ <exclude package="zope.app.authentication" file="ftpplugins.zcml" />
+ <exclude package="zope.app.authentication" file="groupfolder.zcml" />
+ <exclude package="zope.app.authentication" file="principalfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" />
+ <exclude package="zope.app.authentication.browser" file="configure.zcml" />
+ <exclude package="zope.app.authentication.browser" file="groupfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" file="httpplugins.zcml" />
+ <exclude package="zope.app.authentication.browser" file="principalfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" file="session.zcml" />
+ <exclude package="zope.app.broken" file="browser.zcml" />
+ <exclude package="zope.app.container.browser" />
+ <exclude package="zope.app.error.browser" />
+ <exclude package="zope.app.folder.browser" />
+ <exclude package="zope.app.i18n.browser" />
+ <exclude package="zope.app.intid.browser" />
+ <exclude package="zope.app.securitypolicy.browser" />
+ <exclude package="zope.app.session" file="browser.zcml" />
+ <exclude package="zope.dublincore.browser" />
+
+
+ <!-- z3c exlude -->
+ <exclude package="z3c.sampledata.browser" />
+
+ <!-- meta configure -->
+ <include package="zope.app.component" file="meta.zcml" />
+ <include package="zope.app.component.browser" file="meta.zcml" />
+ <include package="zope.app.container.browser" file="meta.zcml" />
+ <include package="zope.app.pagetemplate" file="meta.zcml" />
+ <include package="zope.app.publication" file="meta.zcml" />
+ <include package="zope.app.publisher" file="meta.zcml" />
+ <include package="zope.app.security" file="meta.zcml" />
+ <include package="zope.i18n" file="meta.zcml" />
+ <include package="zope.security" file="meta.zcml" />
+ <include package="zope.securitypolicy" file="meta.zcml" />
+ <include package="zope.viewlet" file="meta.zcml" />
+
+
+ <!-- load 3rd party meta configuration -->
+ <include package="z3c.baseregistry" file="meta.zcml" />
+ <include package="z3c.form" file="meta.zcml" />
+ <include package="z3c.macro" file="meta.zcml" />
+ <include package="z3c.pagelet" file="meta.zcml" />
+ <include package="z3c.sampledata" file="meta.zcml" />
+ <include package="z3c.template" file="meta.zcml" />
+ <include package="z3c.zrtresource" file="meta.zcml" />
+
+
+ <!-- vocabulary setup, that's bad and weird, because this is meta configuration -->
+ <include package="zope.app.schema" />
+
+
+ <!-- bootstrap Database -->
+ <include package="zope.app.appsetup" />
+ <include package="zope.app.zopeappgenerations" />
+
+ <!-- zope server -->
+ <include package="zope.app.server" />
+ <include package="zope.app.twisted" />
+ <include package="zope.app.wsgi" />
+
+
+ <!-- zope packages -->
+ <include package="zope.annotation" />
+ <include package="zope.component" />
+ <include package="zope.contentprovider" />
+ <include package="zope.dublincore" />
+ <include package="zope.error" />
+ <include package="zope.location" />
+ <include package="zope.publisher" />
+ <include package="zope.securitypolicy" />
+ <include package="zope.session" />
+ <include package="zope.traversing" />
+ <include package="zope.traversing.browser" />
+
+
+ <!-- zope app package configuration -->
+ <include package="zope.app.authentication" />
+ <include package="zope.app.broken" />
+ <include package="zope.app.component" />
+ <include package="zope.app.container" />
+ <include package="zope.app.folder" />
+ <include package="zope.app.http" />
+ <include package="zope.app.intid" />
+ <include package="zope.app.keyreference" />
+ <include package="zope.app.principalannotation" />
+ <include package="zope.app.publication" />
+ <include package="zope.app.publisher" />
+ <include package="zope.app.publisher.browser" />
+ <include package="zope.app.security" />
+ <include package="zope.app.securitypolicy" />
+ <include package="zope.app.session" />
+
+
+ <!-- z3c component -->
+ <include package="z3c.breadcrumb" />
+ <include package="z3c.form" />
+ <include package="z3c.formui" />
+ <include package="z3c.layer.pagelet" />
+ <include package="z3c.layer.ready2go" />
+ <include package="z3c.menu.ready2go" />
+ <include package="z3c.macro" />
+ <include package="z3c.pagelet" />
+
+
+ <!-- zam configuration -->
+ <include package="zam.api" />
+ <include package="zam.skin" />
+ <include package="zamplugin.sampledata" />
+
+
+ <browser:defaultSkin name="ZAM" />
+
+ <!-- default view points to TestPage -->
+ <browser:defaultView name="index.html" />
+
+
+ <!-- from zope.app.i18n move this to another package -->
+ <!-- Setup charset negotiation -->
+ <adapter
+ factory="zope.publisher.http.HTTPCharsets"
+ for="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.i18n.interfaces.IUserPreferredCharsets"
+ />
+
+ <!-- Setup charset negotiation --><!-- move this to another package -->
+ <adapter
+ factory="zope.app.publisher.browser.ModifiableBrowserLanguages"
+ for="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.i18n.interfaces.IModifiableUserPreferredLanguages"
+ />
+
+ <class class="zope.publisher.http.HTTPRequest">
+ <implements
+ interface="zope.annotation.interfaces.IAttributeAnnotatable"
+ />
+ </class>
+
+ <!-- load other zcml files -->
+ <include file="securitypolicy.zcml" />
+ <include file="principals.zcml" />
+
+ </configure>
+
+principals.zcml =
+ <unauthenticatedPrincipal
+ id="lovelybooks.anybody"
+ title="Unauthenticated User"
+ />
+
+ <unauthenticatedGroup
+ id="zope.Anybody"
+ title="Unauthenticated Users"
+ />
+
+ <authenticatedGroup
+ id="zope.Authenticated"
+ title="Authenticated Users"
+ />
+
+ <everybodyGroup
+ id="zope.Everybody"
+ title="All Users"
+ />
+
+ <principal
+ id="zope.manager"
+ title="Manager"
+ login="Manager"
+ password="password"
+ />
+
+ <grant
+ role="zope.Manager"
+ principal="zope.manager"
+ />
+
+securitypolicy.zcml =
+ <include package="zope.app.securitypolicy" />
+
+ <securityPolicy
+ component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+ <role id="zope.Anonymous" title="Everybody"
+ description="All users have this role implicitly" />
+ <role id="zope.Manager" title="Site Manager" />
+ <role id="zope.Member" title="Site Member" />
+
+ <!-- Replace the following directive if you don't want public access -->
+ <grant
+ permission="zope.View"
+ role="zope.Anonymous"
+ />
+ <grant
+ permission="zope.app.dublincore.view"
+ role="zope.Anonymous"
+ />
+
+ <grantAll role="zope.Manager" />
+
+
+[var]
+recipe = zc.recipe.filestorage
+
Added: zamplugin.sampledata/trunk/setup.py
===================================================================
--- zamplugin.sampledata/trunk/setup.py (rev 0)
+++ zamplugin.sampledata/trunk/setup.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,92 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+"""Setup
+
+$Id:$
+"""
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup (
+ name='zamplugin.sampledata',
+ version='0.5.0',
+ author = "Roger Ineichen and the Zope Community",
+ author_email = "zope3-dev at zope.org",
+ description = "Sampledata management views Zope Application Management",
+ long_description=(
+ read('README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ license = "ZPL 2.1",
+ keywords = "zope3 sampledata manager views",
+ classifiers = [
+ 'Development Status :: 4 - Beta',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ url = 'http://cheeseshop.python.org/pypi/zamplugin.sampledata',
+ packages = find_packages('src'),
+ include_package_data = True,
+ package_dir = {'':'src'},
+ namespace_packages = ['zamplugin'],
+ extras_require = dict(
+ test = [
+ 'z3c.coverage',
+ 'z3c.testing',
+ 'zope.app.testing',
+ 'zope.testbrowser',
+ ],
+ app = [
+ 'zope.app.appsetup',
+ 'zope.app.authentication',
+ 'zope.app.component',
+ 'zope.app.keyreference',
+ 'zope.app.publication',
+ 'zope.app.schema',
+ 'zope.i18n',
+ 'zope.publisher',
+ 'zope.schema',
+ 'zope.security',
+ 'zope.securitypolicy',
+ 'zope.session',
+ ],
+ ),
+ install_requires = [
+ 'setuptools',
+ 'z3c.baseregistry',
+ 'z3c.form',
+ 'z3c.formui',
+ 'z3c.menu.ready2go',
+ 'z3c.pagelet',
+ 'z3c.sampledata',
+ 'z3c.template',
+ 'zam.api',
+ 'zam.skin',
+ 'zope.component',
+ 'zope.exceptions',
+ 'zope.interface',
+ 'zope.schema',
+ 'zope.traversing',
+ ],
+ zip_safe = False,
+)
Property changes on: zamplugin.sampledata/trunk/setup.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/__init__.py
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/__init__.py (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/__init__.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,7 @@
+# this is a namespace package
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/__init__.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/README.txt
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/README.txt (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/README.txt 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,25 @@
+======
+README
+======
+
+This package contains the Zope Application Management skin. This skin supports
+a modular application management UI without any dependency to the old skin
+implementations. The goal of this new skin is to support a more modular
+concept which allows us to register only what we need.
+
+Login as manager first:
+
+ >>> from zope.testbrowser.testing import Browser
+ >>> manager = Browser()
+ >>> manager.addHeader('Authorization', 'Basic mgr:mgrpw')
+
+Check if we can access the page.html view which is registred in the
+ftesting.zcml file with our skin:
+
+ >>> manager = Browser()
+ >>> manager.handleErrors = False
+ >>> manager.addHeader('Authorization', 'Basic mgr:mgrpw')
+ >>> skinURL = 'http://localhost/++skin++ZAM/index.html'
+ >>> manager.open(skinURL)
+ >>> manager.url
+ 'http://localhost/++skin++ZAM/index.html'
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/__init__.py
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/__init__.py (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/__init__.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1 @@
+# Make a package.
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/__init__.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.py
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.py (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,159 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+"""
+$Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+__docformat__ = "reStructuredText"
+
+import zope.interface
+import zope.component
+import zope.schema
+from zope.traversing.browser import absoluteURL
+from zope.exceptions.interfaces import DuplicationError
+
+from z3c.template.template import getPageTemplate
+from z3c.template.template import getLayoutTemplate
+from z3c.template.interfaces import ILayoutTemplate
+from z3c.pagelet import browser
+from z3c.form.interfaces import IWidgets
+from z3c.form import field
+from z3c.form import button
+from z3c.formui import form
+from z3c.formui import layout
+from z3c.sampledata.interfaces import ISampleManager
+
+from zam.api.i18n import MessageFactory as _
+from zamplugin.sampledata import interfaces
+
+
+
+class SampleData(browser.BrowserPagelet):
+ """Sampledata managers."""
+
+ zope.interface.implements(interfaces.ISampleDataPage)
+
+ def managers(self):
+ return [name for name, util in
+ zope.component.getUtilitiesFor(ISampleManager)]
+
+ def update(self):
+ if 'manager' in self.request:
+ managerName = self.request['manager']
+ self.request.response.redirect(
+ absoluteURL(self.context, self.request)+
+ '/@@generatesample.html?manager="%s"'%(managerName))
+
+
+class IGeneratorSchema(zope.interface.Interface):
+ """Schema for the minimal generator parameters"""
+
+ seed = zope.schema.TextLine(
+ title = _('Seed'),
+ description = _('A seed for the random generator'),
+ default = u'sample',
+ required=False,
+ )
+
+
+class GenerateSample(form.Form):
+ """Edit all generator parameters for a given manager"""
+
+ zope.interface.implements(interfaces.ISampleDataPage)
+
+ subforms = []
+ workDone = False
+
+ @property
+ def showGenerateButton(self):
+ if self.request.get('manager', None) is None:
+ return False
+ return True
+
+ def updateWidgets(self):
+ self.widgets = zope.component.getMultiAdapter(
+ (self, self.request, self.getContent()), IWidgets)
+ self.widgets.ignoreContext = True
+ self.widgets.update()
+
+ def update(self):
+ managerName = self.request.get('manager', None)
+ if managerName is not None:
+ self.subforms = []
+ manager = zope.component.getUtility(ISampleManager, name=managerName)
+ plugins = manager.orderedPlugins()
+ self.fields = field.Fields()
+ subform = Generator(context=self.context,
+ request=self.request,
+ schema=IGeneratorSchema,
+ prefix='generator')
+ subform.fields = field.Fields(IGeneratorSchema)
+ self.subforms.append(subform)
+ for plugin in plugins:
+ if plugin.generator.schema is None:
+ continue
+ subform = Generator(context=self.context,
+ request=self.request,
+ plugin=plugin.generator,
+ prefix=str(plugin.name))
+ subform.fields = field.Fields(plugin.generator.schema)
+ self.subforms.append(subform)
+ super(GenerateSample, self).update()
+
+ @button.buttonAndHandler(u'Generate',
+ condition=lambda form: form.showGenerateButton)
+ def handleGenerate(self, action):
+ managerName = self.request['manager']
+ manager = zope.component.getUtility(ISampleManager, name=managerName)
+ generatorData = {}
+ for subform in self.subforms:
+ subform.update()
+ formData = {}
+ data, errors = subform.widgets.extract()
+ generatorData[subform.prefix] = data
+ gen = generatorData.get('generator', {})
+ seed = gen.get('seed', None)
+ try:
+ self.workedOn = manager.generate(context=self.context,
+ param=generatorData, seed=seed)
+ self.workDone = True
+ except DuplicationError:
+ self.status = _('Duplidated item')
+
+ def manager(self):
+ return self.request.get('manager', None)
+
+
+class Generator(form.Form):
+ """An editor for a single generator"""
+
+ template = getPageTemplate('subform')
+
+ def updateWidgets(self):
+ self.widgets = zope.component.getMultiAdapter(
+ (self, self.request, self.getContent()), IWidgets)
+ self.widgets.ignoreContext = True
+ self.widgets.update()
+
+ def __init__(self, context, request, plugin=None, schema=None, prefix=''):
+ self.plugin = plugin
+ self.schema = schema
+ self.prefix = str(prefix) # must be a string in z3c.form
+ super(Generator, self).__init__(context, request)
+
+ def render(self):
+ return self.template()
+
+ def __call__(self):
+ self.update()
+ return self.render()
\ No newline at end of file
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.zcml
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.zcml (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.zcml 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,41 @@
+<configure
+ xmlns:zope="http://namespaces.zope.org/zope"
+ xmlns="http://namespaces.zope.org/browser"
+ xmlns:z3c="http://namespaces.zope.org/z3c"
+ i18n_domain="zam">
+
+ <z3c:pagelet
+ name="sampledata.html"
+ for="*"
+ class=".browser.SampleData"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ permission="zope.ManageSite"
+ />
+
+ <z3c:template
+ template="sampledata.pt"
+ for=".browser.SampleData"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ />
+
+ <z3c:pagelet
+ name="generatesample.html"
+ for="zope.app.folder.interfaces.IFolder"
+ class=".browser.GenerateSample"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ permission="zope.ManageSite"
+ />
+
+ <z3c:template
+ template="generatesample.pt"
+ for=".browser.GenerateSample"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ />
+
+ <z3c:template
+ template="generator.pt"
+ for=".browser.Generator"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ />
+
+</configure>
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/browser.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/configure.zcml
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/configure.zcml (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/configure.zcml 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,15 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="zam">
+
+ <include file="plugin.zcml" />
+
+
+ <registerIn registry="zamplugin.sampledata.plugin.SampleDataBaseRegistry">
+
+ <include file="browser.zcml" />
+ <include file="menu.zcml" />
+
+ </registerIn>
+
+</configure>
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/configure.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/ftesting.zcml
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/ftesting.zcml (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/ftesting.zcml 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,211 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:meta="http://namespaces.zope.org/meta"
+ xmlns:browser="http://namespaces.zope.org/browser"
+ xmlns:z3c="http://namespaces.zope.org/z3c"
+ i18n_domain="zope">
+
+ <!-- Turn on the devmode -->
+ <meta:provides feature="devmode" />
+
+ <!-- load meta configuration for exclude -->
+ <include package="zc.configuration" file="meta.zcml" />
+
+ <!-- exclude will prevent from include -->
+ <exclude package="zope.app.authentication" file="ftpplugins.zcml" />
+ <exclude package="zope.app.authentication" file="groupfolder.zcml" />
+ <exclude package="zope.app.authentication" file="principalfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" />
+ <exclude package="zope.app.authentication.browser" file="configure.zcml" />
+ <exclude package="zope.app.authentication.browser" file="groupfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" file="httpplugins.zcml" />
+ <exclude package="zope.app.authentication.browser" file="principalfolder.zcml" />
+ <exclude package="zope.app.authentication.browser" file="session.zcml" />
+ <exclude package="zope.app.broken" file="browser.zcml" />
+ <exclude package="zope.app.container.browser" />
+ <exclude package="zope.app.error.browser" />
+ <exclude package="zope.app.folder.browser" />
+ <exclude package="zope.app.i18n.browser" />
+ <exclude package="zope.app.intid.browser" />
+ <exclude package="zope.app.securitypolicy.browser" />
+ <exclude package="zope.app.session" file="browser.zcml" />
+ <exclude package="zope.dublincore.browser" />
+
+
+ <!-- z3c exlude -->
+ <exclude package="z3c.sampledata.browser" />
+
+ <!-- meta configure -->
+ <include package="zope.app.component" file="meta.zcml" />
+ <include package="zope.app.component.browser" file="meta.zcml" />
+ <include package="zope.app.container.browser" file="meta.zcml" />
+ <include package="zope.app.pagetemplate" file="meta.zcml" />
+ <include package="zope.app.publication" file="meta.zcml" />
+ <include package="zope.app.publisher" file="meta.zcml" />
+ <include package="zope.app.security" file="meta.zcml" />
+ <include package="zope.i18n" file="meta.zcml" />
+ <include package="zope.security" file="meta.zcml" />
+ <include package="zope.securitypolicy" file="meta.zcml" />
+ <include package="zope.viewlet" file="meta.zcml" />
+
+
+ <!-- load 3rd party meta configuration -->
+ <include package="z3c.baseregistry" file="meta.zcml" />
+ <include package="z3c.form" file="meta.zcml" />
+ <include package="z3c.macro" file="meta.zcml" />
+ <include package="z3c.pagelet" file="meta.zcml" />
+ <include package="z3c.sampledata" file="meta.zcml" />
+ <include package="z3c.template" file="meta.zcml" />
+ <include package="z3c.zrtresource" file="meta.zcml" />
+
+
+ <!-- vocabulary setup, that's bad and weird, because this is meta configuration -->
+ <include package="zope.app.schema" />
+
+
+ <!-- bootstrap Database -->
+ <include package="zope.app.appsetup" />
+ <include package="zope.app.zopeappgenerations" />
+
+ <!-- zope server -->
+ <include package="zope.app.server" />
+ <include package="zope.app.twisted" />
+ <include package="zope.app.wsgi" />
+
+
+ <!-- zope packages -->
+ <include package="zope.annotation" />
+ <include package="zope.component" />
+ <include package="zope.contentprovider" />
+ <include package="zope.dublincore" />
+ <include package="zope.error" />
+ <include package="zope.location" />
+ <include package="zope.publisher" />
+ <include package="zope.securitypolicy" />
+ <include package="zope.session" />
+ <include package="zope.traversing" />
+ <include package="zope.traversing.browser" />
+
+
+ <!-- zope app package configuration -->
+ <include package="zope.app.authentication" />
+ <include package="zope.app.broken" />
+ <include package="zope.app.component" />
+ <include package="zope.app.container" />
+ <include package="zope.app.folder" />
+ <include package="zope.app.http" />
+ <include package="zope.app.intid" />
+ <include package="zope.app.keyreference" />
+ <include package="zope.app.principalannotation" />
+ <include package="zope.app.publication" />
+ <include package="zope.app.publisher" />
+ <include package="zope.app.publisher.browser" />
+ <include package="zope.app.security" />
+ <include package="zope.app.securitypolicy" />
+ <include package="zope.app.session" />
+
+
+ <!-- z3c component -->
+ <include package="z3c.breadcrumb" />
+ <include package="z3c.form" />
+ <include package="z3c.formui" />
+ <include package="z3c.layer.pagelet" />
+ <include package="z3c.layer.ready2go" />
+ <include package="z3c.menu.ready2go" />
+ <include package="z3c.macro" />
+ <include package="z3c.pagelet" />
+
+
+ <!-- zam configuration -->
+ <include package="zam.api" />
+ <include package="zam.skin" />
+ <include package="zamplugin.sampledata" />
+
+
+ <browser:defaultSkin name="ZAM" />
+
+ <!-- default view points to TestPage -->
+ <browser:defaultView name="index.html" />
+
+
+ <!-- from zope.app.i18n move this to another package -->
+ <!-- Setup charset negotiation -->
+ <adapter
+ factory="zope.publisher.http.HTTPCharsets"
+ for="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.i18n.interfaces.IUserPreferredCharsets"
+ />
+
+ <!-- Setup charset negotiation --><!-- move this to another package -->
+ <adapter
+ factory="zope.app.publisher.browser.ModifiableBrowserLanguages"
+ for="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.i18n.interfaces.IModifiableUserPreferredLanguages"
+ />
+
+ <class class="zope.publisher.http.HTTPRequest">
+ <implements
+ interface="zope.annotation.interfaces.IAttributeAnnotatable"
+ />
+ </class>
+
+
+ <!-- load security policy -->
+ <include package="zope.securitypolicy" />
+
+ <securityPolicy
+ component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy"
+ />
+
+ <role id="zope.Anonymous"
+ title="Everybody"
+ description="All users have this role implicitly"
+ />
+ <role id="zope.Manager" title="Site Manager" />
+ <role id="zope.Member" title="Site Member" />
+
+ <grant permission="zope.View"
+ role="zope.Anonymous" />
+ <grant permission="zope.app.dublincore.view"
+ role="zope.Anonymous" />
+
+ <grantAll role="zope.Manager" />
+
+
+ <!-- setup principals -->
+ <unauthenticatedPrincipal
+ id="zope.anybody"
+ title="Unauthenticated User" />
+
+ <unauthenticatedGroup
+ id="zope.Anybody"
+ title="Unauthenticated Users"
+ />
+
+ <authenticatedGroup
+ id="zope.Authenticated"
+ title="Authenticated Users"
+ />
+
+ <everybodyGroup
+ id="zope.Everybody"
+ title="All Users"
+ />
+
+ <principal
+ id="zope.mgr"
+ title="Manager"
+ login="mgr"
+ password="mgrpw" />
+
+ <grant role="zope.Manager" principal="zope.mgr" />
+
+ <principal
+ id="zope.globalmgr"
+ title="Manager"
+ login="globalmgr"
+ password="globalmgrpw" />
+
+ <grant role="zope.Manager" principal="zope.globalmgr" />
+
+</configure>
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/generatesample.pt
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/generatesample.pt (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/generatesample.pt 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,42 @@
+<div metal:use-macro="macro:form" >
+ <div metal:fill-slot="extra-info">
+ <input type="hidden" name="manager" value="" tal:attributes="value view/manager" />
+ </div>
+ <div metal:fill-slot="main">
+ <tal:block condition="not: view/workDone">
+ <p i18n:translate="" class="error">Warning: proceeding will populate
+ the database with randomly generated data. Do not do this if you have
+ any valuable data in your instance.</p>
+ <p i18n:translate="">Setting a random seed allows you to reproduce
+ the same set of sample data by generating it again with the same value
+ of the random seed.</p>
+ <hr/>
+ <tal:block tal:repeat="subform view/subforms">
+ <p tal:content="subform/prefix"></p>
+ <div tal:replace="structure subform" />
+ <hr/>
+ </tal:block>
+ </tal:block>
+ <tal:block condition="view/workDone">
+ <p>Sample data generated. Below is the list of plugins in the order they where
+ executed along with the CPU time it took to run them</p>
+ <table class="listing">
+ <tr>
+ <th>Plugin Name</th>
+ <th>CPU time used (seconds)</th>
+ </tr>
+ <tr tal:repeat="plugin view/workedOn">
+ <td tal:content="plugin/name"></td>
+ <td tal:content="plugin/time"></td>
+ </tr>
+ </table>
+ </tal:block>
+ </div>
+ <div metal:fill-slot="buttons" tal:condition="not:view/workDone">
+ <div class="buttons">
+ <input tal:repeat="action view/actions/values"
+ tal:replace="structure action/render"
+ />
+ </div>
+ </div>
+</div>
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/generatesample.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/generator.pt
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/generator.pt (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/generator.pt 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1 @@
+<div metal:use-macro="macro:viewspace" />
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/generator.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/interfaces.py
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/interfaces.py (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/interfaces.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,23 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+"""
+$Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+__docformat__ = "reStructuredText"
+
+import zope.interface
+
+
+class ISampleDataPage(zope.interface.Interface):
+ """Sample data page marker (used for menu item)."""
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/interfaces.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.py
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.py (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,28 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+"""
+$Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+__docformat__ = "reStructuredText"
+
+from z3c.menu.ready2go import item
+from zamplugin.sampledata import interfaces
+
+
+class SampleDataMenuItem(item.GlobalMenuItem):
+ """Errors menu item."""
+
+ viewName = 'sampledata.html'
+ viewInterface = interfaces.ISampleDataPage
+ weight = 3
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.zcml
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.zcml (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.zcml 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,15 @@
+<configure
+ xmlns:zope="http://namespaces.zope.org/zope"
+ xmlns="http://namespaces.zope.org/browser"
+ i18n_domain="zam">
+
+ <viewlet
+ name="Sample data"
+ for="*"
+ class=".menu.SampleDataMenuItem"
+ manager="zam.api.menu.IGlobalMenu"
+ layer="zam.api.layer.IZAMBrowserLayer"
+ permission="zope.ManageServices"
+ />
+
+</configure>
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/menu.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.py
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.py (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,38 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+"""
+$Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+__docformat__ = "reStructuredText"
+
+import zope.component
+
+from z3c.baseregistry import baseregistry
+
+from zam.api.i18n import MessageFactory as _
+from zam.api import plugin
+
+
+SampleDataBaseRegistry = baseregistry.BaseComponents(
+ zope.component.globalSiteManager, 'zamplugin.sampledata')
+
+
+class SampleDataPlugin(plugin.BaseRegistryPlugin):
+ """ZAM sampledata configuration views plugin."""
+
+ registry = SampleDataBaseRegistry
+
+ title = _("Sample data configuration views")
+
+ description = _("ZAM sample data configuration views utility.")
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.zcml
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.zcml (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.zcml 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,17 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="zam">
+
+ <utility
+ component=".plugin.SampleDataBaseRegistry"
+ provides="zope.component.interfaces.IComponents"
+ name="zamplugin.sampledata"
+ />
+
+ <utility
+ factory=".plugin.SampleDataPlugin"
+ provides="zam.api.interfaces.IPlugin"
+ name="zamplugin.sampledata"
+ />
+
+</configure>
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/plugin.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/sampledata.pt
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/sampledata.pt (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/sampledata.pt 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,8 @@
+<h1 i18n:translate="">Sample Data Generation</h1>
+ <div class="row">Select the sample manager</div>
+ <div class="row"
+ tal:repeat="manager view/managers">
+ <a href=""
+ tal:attributes="href string:@@generatesample.html?manager=${manager}"
+ tal:content="manager" />
+ </div>
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/sampledata.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zamplugin.sampledata/trunk/src/zamplugin/sampledata/tests.py
===================================================================
--- zamplugin.sampledata/trunk/src/zamplugin/sampledata/tests.py (rev 0)
+++ zamplugin.sampledata/trunk/src/zamplugin/sampledata/tests.py 2008-02-16 16:20:22 UTC (rev 83910)
@@ -0,0 +1,33 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+"""
+$Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+
+import unittest
+from zope.app.testing import functional
+
+functional.defineLayer('TestLayer', 'ftesting.zcml')
+
+
+def test_suite():
+ suite = unittest.TestSuite()
+ s = functional.FunctionalDocFileSuite('README.txt')
+ s.layer = TestLayer
+ suite.addTest(s)
+
+ return suite
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='test_suite')
Property changes on: zamplugin.sampledata/trunk/src/zamplugin/sampledata/tests.py
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Checkins
mailing list