Back to index

plone3  3.1.7
setuphandlers.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2004 Zope Corporation and Contributors. All Rights Reserved.
00004 #
00005 # This software is subject to the provisions of the Zope Public License,
00006 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
00007 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00008 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00009 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00010 # FOR A PARTICULAR PURPOSE.
00011 #
00012 ##############################################################################
00013 """ CMFDefault setup handlers.
00014 
00015 $Id: setuphandlers.py 68358 2006-05-29 19:42:51Z yuppie $
00016 """
00017 
00018 from exceptions import BadRequest
00019 
00020 
00021 def importVarious(context):
00022     """ Import various settings.
00023 
00024     This provisional handler will be removed again as soon as full handlers
00025     are implemented for these steps.
00026     """
00027     site = context.getSite()
00028 
00029     try:
00030         site.manage_addPortalFolder('Members')
00031     except BadRequest:
00032         return 'Various settings: Nothing to import.'
00033     site.Members.manage_addProduct['OFSP'].manage_addDTMLMethod('index_html',
00034                                         'Member list', '<dtml-return roster>')
00035     site.acl_users.encrypt_passwords = False
00036 
00037     return 'Various settings from PortalGenerator imported.'