[CMF-checkins] CVS: Products/CMFDefault - Portal.py:1.46

Yvo Schubbe y.2004_ at wcm-solutions.de
Sun Oct 17 16:04:24 EDT 2004


Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv4435/CMFDefault

Modified Files:
	Portal.py 
Log Message:
- refactored reconfig_form
- added 'default_charset' property (http://collector.zope.org/CMF/261, part 2)


=== Products/CMFDefault/Portal.py 1.45 => 1.46 ===
--- Products/CMFDefault/Portal.py:1.45	Wed Sep  8 11:57:14 2004
+++ Products/CMFDefault/Portal.py	Sun Oct 17 16:03:53 2004
@@ -202,7 +202,7 @@
         addCMFDefaultTool('Default Properties Tool', None)
         addCMFDefaultTool('Default Metadata Tool', None)
         addCMFDefaultTool('Default Syndication Tool', None)
-        
+
         # try to install CMFUid without raising exceptions if not available
         try:
             addCMFUidTool = p.manage_addProduct['CMFUid'].manage_addTool
@@ -212,7 +212,7 @@
             addCMFUidTool('Unique Id Annotation Tool', None)
             addCMFUidTool('Unique Id Generator Tool', None)
             addCMFUidTool('Unique Id Handler Tool', None)
-        
+
     def setupMailHost(self, p):
         p.manage_addProduct['MailHost'].manage_addMailHost(
             'MailHost', smtp_host='localhost')
@@ -346,11 +346,11 @@
 
     def setupDefaultProperties(self, p, title, description,
                                email_from_address, email_from_name,
-                               validate_email,
-                               ):
+                               validate_email, default_charset):
         p._setProperty('email_from_address', email_from_address, 'string')
         p._setProperty('email_from_name', email_from_name, 'string')
         p._setProperty('validate_email', validate_email and 1 or 0, 'boolean')
+        p._setProperty('default_charset', '', 'string')
         p.title = title
         p.description = description
 
@@ -362,15 +362,15 @@
                          create_userfolder=1,
                          email_from_address='postmaster at localhost',
                          email_from_name='Portal Administrator',
-                         validate_email=0, RESPONSE=None):
-    '''
-    Adds a portal instance.
-    '''
+                         validate_email=0, default_charset='',
+                         RESPONSE=None):
+    """ Adds a portal instance.
+    """
     gen = PortalGenerator()
     id = id.strip()
     p = gen.create(self, id, create_userfolder)
     gen.setupDefaultProperties(p, title, description,
                                email_from_address, email_from_name,
-                               validate_email)
+                               validate_email, default_charset)
     if RESPONSE is not None:
         RESPONSE.redirect(p.absolute_url() + '/finish_portal_construction')



More information about the CMF-checkins mailing list