[CMF-checkins] SVN: CMF/trunk/ - made sure CMFDefault uses the
GenericSetup tool
Yvo Schubbe
y.2005- at wcm-solutions.de
Wed Sep 28 06:33:46 EDT 2005
Log message for revision 38660:
- made sure CMFDefault uses the GenericSetup tool
- added an 'id' argument to the tool factory
- made sure old CMFSetup tools without 'id' property still work
- updated the CMFDefault default profile
- removed some obsolete files
Changed:
UU CMF/trunk/CMFCore/tests/test_exportimport.py
U CMF/trunk/CMFDefault/factory.py
U CMF/trunk/CMFDefault/profiles/default/export_steps.xml
U CMF/trunk/CMFDefault/profiles/default/import_steps.xml
U CMF/trunk/CMFDefault/profiles/default/toolset.xml
U CMF/trunk/CMFSetup/__init__.py
U CMF/trunk/CMFSetup/tool.py
D CMF/trunk/CMFSetup/xml/esrExport.xml
D CMF/trunk/CMFSetup/xml/isrExport.xml
D CMF/trunk/CMFSetup/xml/rmeExport.xml
D CMF/trunk/CMFSetup/xml/tscExport.xml
U CMF/trunk/GenericSetup/DEPENDENCIES.txt
U CMF/trunk/GenericSetup/PROFILES.txt
U CMF/trunk/GenericSetup/tests/test_tool.py
U CMF/trunk/GenericSetup/tool.py
D CMF/trunk/GenericSetup/www/siteAddForm.zpt
-=-
Modified: CMF/trunk/CMFCore/tests/test_exportimport.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_exportimport.py 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFCore/tests/test_exportimport.py 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,3 +1,15 @@
+##############################################################################
+#
+# Copyright (c) 2004 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.
+#
+##############################################################################
""" Unit tests for Products.CMFCore.exportimport
$Id$
@@ -2,3 +14,6 @@
"""
+
import unittest
+import Testing
+
from csv import reader
@@ -29,7 +44,7 @@
def _makeSetupTool(self):
from Products.GenericSetup.tool import SetupTool
- return SetupTool()
+ return SetupTool('portal_setup')
def _setUpAdapters(self):
from zope.app.tests import ztapi
@@ -853,5 +868,3 @@
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
-
-
Property changes on: CMF/trunk/CMFCore/tests/test_exportimport.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: CMF/trunk/CMFDefault/factory.py
===================================================================
--- CMF/trunk/CMFDefault/factory.py 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFDefault/factory.py 2005-09-28 10:33:45 UTC (rev 38660)
@@ -18,14 +18,16 @@
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.CMFCore.utils import getToolByName
-from Products.CMFSetup import EXTENSION
-from Products.CMFSetup import profile_registry
-from Products.CMFSetup.tool import SetupTool
+from Products.GenericSetup import EXTENSION
+from Products.GenericSetup import profile_registry
+from Products.GenericSetup.tool import SetupTool
from Portal import CMFSite
from utils import _wwwdir
+_TOOL_ID = 'portal_setup'
+
def addConfiguredSiteForm(dispatcher):
""" Wrap the PTF in 'dispatcher', including 'profile_registry' in options.
"""
@@ -51,9 +53,8 @@
dispatcher._setObject( site_id, site )
site = dispatcher._getOb( site_id )
- setup_tool = SetupTool()
- site._setObject( 'portal_setup', setup_tool )
- setup_tool = getToolByName( site, 'portal_setup' )
+ site._setObject(_TOOL_ID, SetupTool(_TOOL_ID))
+ setup_tool = getToolByName(site, _TOOL_ID)
setup_tool.setImportContext( 'profile-%s' % profile_id )
setup_tool.runAllImportSteps()
Modified: CMF/trunk/CMFDefault/profiles/default/export_steps.xml
===================================================================
--- CMF/trunk/CMFDefault/profiles/default/export_steps.xml 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFDefault/profiles/default/export_steps.xml 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,5 +1,16 @@
<?xml version="1.0"?>
<export-steps>
+ <export-step id="actions"
+ handler="Products.CMFSetup.actions.exportActionProviders"
+ title="Action Providers">
+
+
+
+ Export actions tool's action providers and their actions.
+
+
+
+ </export-step>
<export-step id="cookieauth"
handler="Products.CMFSetup.cookieauth.exportCookieCrumbler"
title="Cookie Authentication">
@@ -11,13 +22,13 @@
</export-step>
- <export-step id="actions"
- handler="Products.CMFSetup.actions.exportActionProviders"
- title="Action Providers">
+ <export-step id="mailhost"
+ handler="Products.CMFSetup.mailhost.exportMailHost"
+ title="MailHost">
- Export actions tool's action providers and their actions.
+ Export the mailhost's settings and properties
@@ -34,7 +45,7 @@
</export-step>
<export-step id="rolemap"
- handler="Products.CMFSetup.rolemap.exportRolemap"
+ handler="Products.GenericSetup.rolemap.exportRolemap"
title="Role / Permission Map">
@@ -56,7 +67,7 @@
</export-step>
<export-step id="step_registries"
- handler="Products.CMFSetup.tool.exportStepRegistries"
+ handler="Products.GenericSetup.tool.exportStepRegistries"
title="Step Registries">
@@ -67,7 +78,7 @@
</export-step>
<export-step id="toolset"
- handler="Products.CMFSetup.tool.exportToolset"
+ handler="Products.GenericSetup.tool.exportToolset"
title="Required Tools">
@@ -99,17 +110,4 @@
</export-step>
-
- <export-step id="mailhost"
- handler="Products.CMFSetup.mailhost.exportMailHost"
- title="MailHost">
-
-
-
- Export the mailhost's settings and properties
-
-
-
- </export-step>
-
</export-steps>
Modified: CMF/trunk/CMFDefault/profiles/default/import_steps.xml
===================================================================
--- CMF/trunk/CMFDefault/profiles/default/import_steps.xml 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFDefault/profiles/default/import_steps.xml 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,6 +1,20 @@
<?xml version="1.0"?>
<import-steps>
- <import-step id="cookie_authentication" version="20050903-01"
+ <import-step id="actions" version="20040630-01"
+ handler="Products.CMFSetup.actions.importActionProviders"
+ title="Action Providers">
+ <dependency step="toolset"/>
+
+
+
+ Import actions tool's action providers and their actions.
+
+
+
+
+ </import-step>
+ <import-step id="cookie_authentication"
+ version="20050903-01"
handler="Products.CMFSetup.cookieauth.importCookieCrumbler"
title="Cookie Authentication">
<dependency step="toolset"/>
@@ -13,15 +27,14 @@
</import-step>
-
- <import-step id="actions" version="20040630-01"
- handler="Products.CMFSetup.actions.importActionProviders"
- title="Action Providers">
+ <import-step id="mailhost" version="20050803-01"
+ handler="Products.CMFSetup.mailhost.importMailHost"
+ title="MailHost">
<dependency step="toolset"/>
- Import actions tool's action providers and their actions.
+ Import mailhost settings
@@ -40,7 +53,7 @@
</import-step>
<import-step id="rolemap" version="20040523-01"
- handler="Products.CMFSetup.rolemap.importRolemap"
+ handler="Products.GenericSetup.rolemap.importRolemap"
title="Role / Permission Map">
@@ -65,7 +78,7 @@
</import-step>
<import-step id="toolset" version="20040630-01"
- handler="Products.CMFSetup.tool.importToolset"
+ handler="Products.GenericSetup.tool.importToolset"
title="Required tools">
@@ -116,17 +129,4 @@
</import-step>
- <import-step id="mailhost" version="20050803-01"
- handler="Products.CMFSetup.mailhost.importMailHost"
- title="MailHost">
- <dependency step="toolset"/>
-
-
-
- Import mailhost settings
-
-
-
-
- </import-step>
</import-steps>
Modified: CMF/trunk/CMFDefault/profiles/default/toolset.xml
===================================================================
--- CMF/trunk/CMFDefault/profiles/default/toolset.xml 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFDefault/profiles/default/toolset.xml 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,6 +1,10 @@
<?xml version="1.0"?>
<tool-setup>
+ <required tool_id="MailHost"
+ class="Products.MailHost.MailHost.MailHost"/>
+ <required tool_id="cookie_authentication"
+ class="Products.CMFCore.CookieCrumbler.CookieCrumbler"/>
<required tool_id="portal_actions"
class="Products.CMFCore.ActionsTool.ActionsTool"/>
<required tool_id="portal_catalog"
@@ -29,8 +33,4 @@
class="Products.CMFCore.URLTool.URLTool"/>
<required tool_id="portal_workflow"
class="Products.CMFCore.WorkflowTool.WorkflowTool"/>
- <required tool_id="MailHost"
- class="Products.MailHost.MailHost.MailHost"/>
- <required tool_id="cookie_authentication"
- class="Products.CMFCore.CookieCrumbler.CookieCrumbler"/>
</tool-setup>
Modified: CMF/trunk/CMFSetup/__init__.py
===================================================================
--- CMF/trunk/CMFSetup/__init__.py 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFSetup/__init__.py 2005-09-28 10:33:45 UTC (rev 38660)
@@ -17,20 +17,10 @@
from AccessControl import ModuleSecurityInfo
-from interfaces import BASE, EXTENSION
-from permissions import ManagePortal
-from registry import _profile_registry as profile_registry
+from Products.GenericSetup import BASE, EXTENSION
+from Products.GenericSetup import ManagePortal
+from Products.GenericSetup import profile_registry
security = ModuleSecurityInfo( 'Products.CMFSetup' )
security.declareProtected( ManagePortal, 'profile_registry' )
-
-def initialize( context ):
-
- from Products.CMFCore.utils import ToolInit
- from tool import SetupTool
-
- ToolInit( 'CMF Setup Tool'
- , tools=[ SetupTool ]
- , icon='www/tool.png'
- ).initialize( context )
Modified: CMF/trunk/CMFSetup/tool.py
===================================================================
--- CMF/trunk/CMFSetup/tool.py 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFSetup/tool.py 2005-09-28 10:33:45 UTC (rev 38660)
@@ -18,4 +18,13 @@
from Products.GenericSetup.tool import exportStepRegistries
from Products.GenericSetup.tool import importToolset
from Products.GenericSetup.tool import exportToolset
-from Products.GenericSetup.tool import SetupTool
+from Products.GenericSetup.tool import SetupTool as BaseTool
+
+
+class SetupTool(BaseTool):
+
+ #BBB: for setup tools created with CMF 1.5
+ id = 'portal_setup'
+
+ def __init__(self, id='portal_setup'):
+ BaseTool.__init__(self, id)
Deleted: CMF/trunk/CMFSetup/xml/esrExport.xml
===================================================================
--- CMF/trunk/CMFSetup/xml/esrExport.xml 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFSetup/xml/esrExport.xml 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<export-steps xmlns:tal="http://xml.zope.org/namespaces/tal">
- <export-step id="STEP_ID"
- handler="DOTTED.NAME"
- title="TITLE"
- tal:repeat="step here/listStepMetadata"
- tal:attributes="id step/id;
- handler step/handler;
- title step/title
- ">
- <span tal:replace="step/description">DESCRIPTION</span>
- </export-step>
-</export-steps>
Deleted: CMF/trunk/CMFSetup/xml/isrExport.xml
===================================================================
--- CMF/trunk/CMFSetup/xml/isrExport.xml 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFSetup/xml/isrExport.xml 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<import-steps xmlns:tal="http://xml.zope.org/namespaces/tal">
- <import-step id="STEP_ID"
- version="STEP_VERSION"
- handler="DOTTED.NAME"
- title="TITLE"
- tal:repeat="step here/listStepMetadata"
- tal:attributes="id step/id;
- version step/version;
- handler step/handler;
- title step/title
- ">
- <dependency step="DEPENDENCY"
- tal:repeat="dep step/dependencies"
- tal:attributes="step dep" />
- <span tal:replace="step/description">DESCRIPTION</span>
- </import-step>
-</import-steps>
Deleted: CMF/trunk/CMFSetup/xml/rmeExport.xml
===================================================================
--- CMF/trunk/CMFSetup/xml/rmeExport.xml 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFSetup/xml/rmeExport.xml 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<rolemap xmlns:tal="http://xml.zope.org/namespaces/tal">
- <roles>
- <role name="ROLENAME"
- tal:repeat="role context/listRoles"
- tal:attributes="name role"/>
- </roles>
- <permissions>
- <permission name="PERMISSION NAME" acquire="True"
- tal:repeat="info context/listPermissions"
- tal:attributes="name info/name;
- acquire info/acquire;
- ">
- <role name="ROLENAME"
- tal:repeat="role info/roles"
- tal:attributes="name role"/>
- </permission>
- </permissions>
-</rolemap>
Deleted: CMF/trunk/CMFSetup/xml/tscExport.xml
===================================================================
--- CMF/trunk/CMFSetup/xml/tscExport.xml 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/CMFSetup/xml/tscExport.xml 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<tool-setup xmlns:tal="http://xml.zope.org/namespaces/tal">
- <forbidden
- tool_id="TOOL_ID"
- tal:repeat="id here/listForbiddenTools"
- tal:attributes="tool_id id" />
- <required
- tool_id="TOOL_ID"
- class="dotted.name.of.tool.class"
- tal:repeat="info here/listRequiredToolInfo"
- tal:attributes="tool_id info/id;
- class info/class;
- " />
-</tool-setup>
Modified: CMF/trunk/GenericSetup/DEPENDENCIES.txt
===================================================================
--- CMF/trunk/GenericSetup/DEPENDENCIES.txt 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/GenericSetup/DEPENDENCIES.txt 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1 +1 @@
-Zope >= 2.8.0
+Zope >= 2.8.1
Modified: CMF/trunk/GenericSetup/PROFILES.txt
===================================================================
--- CMF/trunk/GenericSetup/PROFILES.txt 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/GenericSetup/PROFILES.txt 2005-09-28 10:33:45 UTC (rev 38660)
@@ -18,7 +18,7 @@
'insert-before' and 'insert-after'
- applies to: object (generic); layer (skins.xml)
+ applies to: object (generic)
'insert-before' and 'insert-after' specify the position of a new item
relative to an existing item. If they are omitted or not valid, items
@@ -26,15 +26,3 @@
item at the top (before all existing items) or the bottom (after all
existing items). If an item with the given ID exists already, it is
moved to the specified position.
-
- 'id="*"' wildcard
-
- applies to: skin-path (skins.xml)
-
- Updates all existing items in the container with the same settings.
-
- 'remove'
-
- applies to: action-provider, skin layer (actions.xml, skins.xml)
-
- Removes the specified item if it exists.
Modified: CMF/trunk/GenericSetup/tests/test_tool.py
===================================================================
--- CMF/trunk/GenericSetup/tests/test_tool.py 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/GenericSetup/tests/test_tool.py 2005-09-28 10:33:45 UTC (rev 38660)
@@ -17,8 +17,6 @@
import unittest
import Testing
-import Zope2
-Zope2.startup()
from StringIO import StringIO
@@ -77,7 +75,7 @@
def test_empty( self ):
- tool = self._makeOne()
+ tool = self._makeOne('setup_tool')
self.assertEqual( tool.getImportContextID(), '' )
@@ -103,7 +101,7 @@
from test_registry import _EMPTY_TOOLSET_XML
from common import _makeTestFile
- tool = self._makeOne()
+ tool = self._makeOne('setup_tool')
_makeTestFile( IMPORT_STEPS_XML
, self._PROFILE_PATH
@@ -127,7 +125,7 @@
def test_setImportContext_invalid( self ):
- tool = self._makeOne()
+ tool = self._makeOne('setup_tool')
self.assertRaises( KeyError
, tool.setImportContext
@@ -145,7 +143,7 @@
from test_registry import ONE_FUNC
from common import _makeTestFile
- tool = self._makeOne()
+ tool = self._makeOne('setup_tool')
tool.getExportStepRegistry().clear()
_makeTestFile( IMPORT_STEPS_XML
@@ -208,7 +206,7 @@
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
self.assertRaises( ValueError, tool.runImportStep, 'nonesuch' )
@@ -217,7 +215,7 @@
TITLE = 'original title'
site = self._makeSite( TITLE )
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'simple', '1', _uppercaseSiteTitle )
@@ -237,7 +235,7 @@
TITLE = 'original title'
site = self._makeSite( TITLE )
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'dependable', '1', _underscoreSiteTitle )
@@ -262,7 +260,7 @@
TITLE = 'original title'
site = self._makeSite( TITLE )
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'dependable', '1', _underscoreSiteTitle )
@@ -283,7 +281,7 @@
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'purging', '1', _purgeIfRequired )
@@ -298,7 +296,7 @@
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'purging', '1', _purgeIfRequired )
@@ -313,7 +311,7 @@
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'purging', '1', _purgeIfRequired )
@@ -328,7 +326,7 @@
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'purging', '1', _purgeIfRequired )
@@ -341,7 +339,7 @@
def test_runAllImportSteps_empty( self ):
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
result = tool.runAllImportSteps()
@@ -351,7 +349,7 @@
TITLE = 'original title'
site = self._makeSite( TITLE )
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'dependable', '1'
@@ -383,7 +381,7 @@
def test_runAllImportSteps_sorted_explicit_purge( self ):
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'dependable', '1'
@@ -408,7 +406,7 @@
def test_runAllImportSteps_sorted_skip_purge( self ):
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
registry = tool.getImportStepRegistry()
registry.registerStep( 'dependable', '1'
@@ -433,7 +431,7 @@
def test_runExportStep_nonesuch( self ):
site = self._makeSite()
- tool = self._makeOne().__of__( site )
+ tool = self._makeOne('setup_tool').__of__( site )
self.assertRaises( ValueError, tool.runExportStep, 'nonesuch' )
@@ -442,7 +440,7 @@
from test_registry import _EMPTY_IMPORT_XML
site = self._makeSite()
- site.setup_tool = self._makeOne()
+ site.setup_tool = self._makeOne('setup_tool')
tool = site.setup_tool
result = tool.runExportStep( 'step_registries' )
@@ -467,7 +465,7 @@
from test_registry import _EMPTY_IMPORT_XML
site = self._makeSite()
- site.setup_tool = self._makeOne()
+ site.setup_tool = self._makeOne('setup_tool')
tool = site.setup_tool
result = tool.runAllExportSteps()
@@ -492,7 +490,7 @@
from test_registry import _EMPTY_IMPORT_XML
site = self._makeSite()
- site.setup_tool = self._makeOne()
+ site.setup_tool = self._makeOne('setup_tool')
tool = site.setup_tool
import_reg = tool.getImportStepRegistry()
@@ -545,7 +543,7 @@
]
site = self._makeSite()
- site.setup_tool = self._makeOne()
+ site.setup_tool = self._makeOne('setup_tool')
tool = site.setup_tool
self.assertEqual( len( tool.listSnapshotInfo() ), 0 )
@@ -687,7 +685,7 @@
site._setId( 'site' )
self.root._setObject( 'site', site )
site = self.root._getOb( 'site' )
- site._setObject( 'setup_tool', SetupTool() )
+ site._setObject('setup_tool', SetupTool('setup_tool'))
return site
class Test_exportToolset( _ToolsetSetup
@@ -900,6 +898,7 @@
</tool-setup>
"""
+
def test_suite():
# reimport to make sure tests are run from Products
from Products.GenericSetup.tests.test_tool import SetupToolTests
Modified: CMF/trunk/GenericSetup/tool.py
===================================================================
--- CMF/trunk/GenericSetup/tool.py 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/GenericSetup/tool.py 2005-09-28 10:33:45 UTC (rev 38660)
@@ -126,17 +126,17 @@
""" Profile-based site configuration manager.
"""
- implements(ISetupTool, implementedBy(Folder))
- id = 'portal_setup'
+ implements(ISetupTool)
+
meta_type = 'Generic Setup Tool'
_import_context_id = ''
security = ClassSecurityInfo()
- def __init__(self):
-
+ def __init__(self, id):
+ self.id = str(id)
self._import_registry = ImportStepRegistry()
self._export_registry = ExportStepRegistry()
self._export_registry.registerStep('step_registries',
@@ -720,12 +720,13 @@
%s"""
+_TOOL_ID = 'setup_tool'
+
addSetupToolForm = PageTemplateFile('toolAdd.zpt', _wwwdir)
def addSetupTool(dispatcher, RESPONSE):
"""
"""
- tool = SetupTool()
- dispatcher._setObject(tool.id, tool)
+ dispatcher._setObject(_TOOL_ID, SetupTool(_TOOL_ID))
RESPONSE.redirect('%s/manage_main' % dispatcher.absolute_url())
Deleted: CMF/trunk/GenericSetup/www/siteAddForm.zpt
===================================================================
--- CMF/trunk/GenericSetup/www/siteAddForm.zpt 2005-09-28 02:24:49 UTC (rev 38659)
+++ CMF/trunk/GenericSetup/www/siteAddForm.zpt 2005-09-28 10:33:45 UTC (rev 38660)
@@ -1,51 +0,0 @@
-<h1 tal:replace="structure context/manage_page_header">PAGE HEADER</h1>
-<h2 tal:define="form_title string:Add Configured CMF Site"
- tal:replace="structure context/manage_form_title">FORM TITLE</h2>
-
-<p class="form-help">Please select ID and configuration for the new site.</p>
-
-<form action="addConfiguredSite" method="post">
-<table cellspacing="0" cellpadding="2" border="0">
- <tr valign="top">
- <td>
- <div class="form-label">Site ID</div>
- </td>
- <td>
- <input type="text" name="site_id" />
- </td>
- </tr>
- <tr valign="top">
- <td>
- <div class="form-label">Setup profile</div>
- </td>
- <td>
- <select name="profile_id">
- <option value="PROFILE_ID"
- tal:repeat="info options/base_profiles"
- tal:attributes="value info/id"
- tal:content="info/title">PROFILE TITLE</option>
- </select>
- </td>
- </tr>
- <tr valign="top">
- <td>
- <div class="form-label">Optional extensions</div>
- </td>
- <td><tal:span tal:repeat="info options/extension_profiles">
- <input type="checkbox" name="extension_ids:list" value="PROFILE_ID"
- tal:attributes="value info/id" />
- <tal:span tal:content="info/title">PROFILE TITLE</tal:span><br /></tal:span>
- </td>
- </tr>
- <tr>
- <td>
-
- </td>
- <td>
- <input class="form-element" type="submit" name="submit" value="Add" />
- </td>
- </tr>
-</table>
-</form>
-
-<h1 tal:replace="structure context/manage_page_footer">PAGE FOOTER</h1>
More information about the CMF-checkins
mailing list