[CMF-checkins] SVN: CMF/trunk/C - Got rid of the "CMF Site" and
"Configured CMF Site" duality in the ZMI
Jens Vagelpohl
jens at dataflake.org
Sat Aug 6 10:52:29 EDT 2005
Log message for revision 37761:
- Got rid of the "CMF Site" and "Configured CMF Site" duality in the ZMI
add list by removing the "CMF Site" class registration in CMFDefault
and moving the "Configured CMF Site" registration from CMFSetup into
CMFDefault, renaming it to "CMF Site".
(http://www.zope.org/Collectors/CMF/364)
The moving of registrations from CMFSetup into CMFDefault was not strictly
necessary, but feels a lot more natural since it is indeed CMFDefault which
has the portal implementation and thus should be the place where it (or a
"munged" representation using CMFSetup) gets registered.
Changed:
U CMF/trunk/CHANGES.txt
U CMF/trunk/CMFCalendar/tests/test_Calendar.py
U CMF/trunk/CMFDefault/__init__.py
A CMF/trunk/CMFDefault/images/portal.gif
D CMF/trunk/CMFDefault/portal.gif
U CMF/trunk/CMFDefault/tests/test_DiscussionReply.py
U CMF/trunk/CMFDefault/tests/test_Image.py
U CMF/trunk/CMFDefault/tests/test_join.py
U CMF/trunk/CMFSetup/__init__.py
U CMF/trunk/CMFSetup/www/siteAddForm.zpt
-=-
Modified: CMF/trunk/CHANGES.txt
===================================================================
--- CMF/trunk/CHANGES.txt 2005-08-06 13:49:43 UTC (rev 37760)
+++ CMF/trunk/CHANGES.txt 2005-08-06 14:52:28 UTC (rev 37761)
@@ -28,6 +28,12 @@
Bug Fixes
+ - Got rid of the "CMF Site" and "Configured CMF Site" duality in the ZMI
+ add list by removing the "CMF Site" class registration in CMFDefault
+ and moving the "Configured CMF Site" registration from CMFSetup into
+ CMFDefault, renaming it to "CMF Site".
+ (http://www.zope.org/Collectors/CMF/364)
+
- Updated RELEASE.txt and the slurp_release script to now use Subversion
instead of CVS, and to reflect the new tag/branch naming conventions
used in the CMF repository.
Modified: CMF/trunk/CMFCalendar/tests/test_Calendar.py
===================================================================
--- CMF/trunk/CMFCalendar/tests/test_Calendar.py 2005-08-06 13:49:43 UTC (rev 37760)
+++ CMF/trunk/CMFCalendar/tests/test_Calendar.py 2005-08-06 14:52:28 UTC (rev 37761)
@@ -81,7 +81,7 @@
# Log in as a god :-)
newSecurityManager( None, UnrestrictedUser('god', 'god', ['Manager'], '') )
- factory = app.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory = app.manage_addProduct['CMFDefault'].addConfiguredSite
factory('CalendarTest', 'CMFDefault:default', snapshot=False,
extension_ids=('CMFCalendar:default',))
self.Site = app.CalendarTest
Modified: CMF/trunk/CMFDefault/__init__.py
===================================================================
--- CMF/trunk/CMFDefault/__init__.py 2005-08-06 13:49:43 UTC (rev 37760)
+++ CMF/trunk/CMFDefault/__init__.py 2005-08-06 14:52:28 UTC (rev 37761)
@@ -115,13 +115,24 @@
'CMFDefault',
BASE)
- context.registerClass( Portal.CMFSite
- , constructors=( Portal.manage_addCMFSiteForm
- , Portal.manage_addCMFSite
+ from Products.CMFSetup.factory import addConfiguredSiteForm
+ from Products.CMFSetup.factory import addConfiguredSite
+
+ # Add factory for a site which follows a profile. We specify
+ # meta_type and interfaces because we don't actually register a
+ # class here, only a factory.
+ context.registerClass( meta_type='CMF Site'
+ , constructors=( addConfiguredSiteForm
+ , addConfiguredSite
)
- , icon='portal.gif'
- )
+ , permissions=( 'Add CMF Sites', )
+ , interfaces=None
+ )
+ # Since there is no "normal" class registration for Portal.CMFSite,
+ # the ZMI icons would disappear without the following icon registration
+ registerIcon(Portal.CMFSite, 'images/portal.gif', globals())
+
registerIcon( DefaultWorkflow.DefaultWorkflowDefinition
, 'images/workflow.gif'
, globals()
Added: CMF/trunk/CMFDefault/images/portal.gif
===================================================================
(Binary files differ)
Property changes on: CMF/trunk/CMFDefault/images/portal.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: CMF/trunk/CMFDefault/portal.gif
===================================================================
(Binary files differ)
Modified: CMF/trunk/CMFDefault/tests/test_DiscussionReply.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_DiscussionReply.py 2005-08-06 13:49:43 UTC (rev 37760)
+++ CMF/trunk/CMFDefault/tests/test_DiscussionReply.py 2005-08-06 14:52:28 UTC (rev 37761)
@@ -31,7 +31,7 @@
def setUp(self):
RequestTest.setUp(self)
try:
- factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
factory('cmf', 'CMFDefault:default', snapshot=False)
self.portal = self.root.cmf
# Become a Manager
Modified: CMF/trunk/CMFDefault/tests/test_Image.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Image.py 2005-08-06 13:49:43 UTC (rev 37760)
+++ CMF/trunk/CMFDefault/tests/test_Image.py 2005-08-06 14:52:28 UTC (rev 37761)
@@ -91,7 +91,7 @@
RequestTest.setUp(self)
try:
newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
- factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
factory('cmf', 'CMFDefault:default', snapshot=False)
self.site = self.root.cmf
self.site.invokeFactory('File', id='file')
Modified: CMF/trunk/CMFDefault/tests/test_join.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_join.py 2005-08-06 13:49:43 UTC (rev 37760)
+++ CMF/trunk/CMFDefault/tests/test_join.py 2005-08-06 14:52:28 UTC (rev 37761)
@@ -26,7 +26,7 @@
class MembershipTests( TransactionalTest ):
def test_join( self ):
- factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
factory('site', 'CMFDefault:default', snapshot=False)
site = self.root.site
member_id = 'test_user'
@@ -40,7 +40,7 @@
self.failUnless(u)
def test_join_without_email( self ):
- factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
factory('site', 'CMFDefault:default', snapshot=False)
site = self.root.site
self.assertRaises(ValueError,
@@ -51,7 +51,7 @@
)
def test_join_with_variable_id_policies( self ):
- factory = self.root.manage_addProduct['CMFSetup'].addConfiguredSite
+ factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
factory('site', 'CMFDefault:default', snapshot=False)
site = self.root.site
member_id = 'test.user'
Modified: CMF/trunk/CMFSetup/__init__.py
===================================================================
--- CMF/trunk/CMFSetup/__init__.py 2005-08-06 13:49:43 UTC (rev 37760)
+++ CMF/trunk/CMFSetup/__init__.py 2005-08-06 14:52:28 UTC (rev 37761)
@@ -35,16 +35,3 @@
, icon='www/tool.png'
).initialize( context )
- from factory import addConfiguredSiteForm
- from factory import addConfiguredSite
-
- # Add factory for a site which follows a profile. We specify
- # meta_type and interfaces because we don't actually register a
- # class here, only a factory.
- context.registerClass( meta_type='Configured CMF Site'
- , constructors=( addConfiguredSiteForm
- , addConfiguredSite
- )
- , permissions=( 'Add CMF Sites', )
- , interfaces=None
- )
Modified: CMF/trunk/CMFSetup/www/siteAddForm.zpt
===================================================================
--- CMF/trunk/CMFSetup/www/siteAddForm.zpt 2005-08-06 13:49:43 UTC (rev 37760)
+++ CMF/trunk/CMFSetup/www/siteAddForm.zpt 2005-08-06 14:52:28 UTC (rev 37761)
@@ -1,5 +1,5 @@
<h1 tal:replace="structure context/manage_page_header">PAGE HEADER</h1>
-<h2 tal:define="form_title string:Add Configured CMF Site"
+<h2 tal:define="form_title string:Add 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>
More information about the CMF-checkins
mailing list