Back to index

plone3  3.1.7
Install.py
Go to the documentation of this file.
00001 from StringIO import StringIO
00002 from Products.Archetypes.Extensions.utils import install_subskin
00003 from Products.CMFCore.utils import getToolByName
00004 
00005 from Products.ATReferenceBrowserWidget.config import *
00006         
00007 def install(self):
00008     out = StringIO()
00009     
00010     # remove comments if you whish to install the demo type
00011     # installTypes(self, out, listTypes(PROJECTNAME), PROJECTNAME)
00012     
00013     # install property for startup_directory
00014     props = getToolByName(self, "portal_properties").site_properties
00015     if not props.hasProperty('refwidget_startupdirectories'):
00016         props._setProperty('refwidget_startupdirectories', [], 'lines')
00017         out.write('Registered property refwidget_startupdirectories in site_properties - see readme.txt')
00018 
00019     install_subskin(self, out, GLOBALS)
00020     out.write("Successfully installed %s." % PROJECTNAME)
00021     return out.getvalue()