File: Install.py

package info (click to toggle)
zope-atrbw 1.5-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 160 kB
  • ctags: 97
  • sloc: python: 275; makefile: 31; sh: 2
file content (22 lines) | stat: -rw-r--r-- 927 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from StringIO import StringIO
from Products.CMFCore.utils import getToolByName
from Products.Archetypes.atapi import listTypes
from Products.Archetypes.Extensions.utils import installTypes, install_subskin

from Products.ATReferenceBrowserWidget.config import *
        
def install(self):
    out = StringIO()
    
    # remove comments if you whish to install the demo type
    # installTypes(self, out, listTypes(PROJECTNAME), PROJECTNAME)
    
    # install property for startup_directory
    props = getToolByName(self, 'portal_properties').site_properties
    if not props.hasProperty('refwidget_startupdirectories'):
        props._setProperty('refwidget_startupdirectories', [], 'lines')
        out.write('Registered property refwidget_startupdirectories in site_properties - see readme.txt')

    install_subskin(self, out, GLOBALS)
    out.write("Successfully installed %s." % PROJECTNAME)
    return out.getvalue()