Back to index

plone3  3.1.7
Functions
wicked.at.Extensions.Install Namespace Reference

Functions

def configureWysiwyg
def configureReferenceCatalog
def install

Function Documentation

Definition at line 20 of file Install.py.

00020 
00021 def configureReferenceCatalog(portal, out):
00022     catalog = getToolByName(portal, REFERENCE_MANAGER)
00023     for indexName, indexType in (
00024         ('targetId', 'FieldIndex'),
00025         ('targetTitle', 'FieldIndex'),
00026         ('targetURL', 'FieldIndex'), ):
00027 
00028         try:
00029             catalog.addIndex(indexName, indexType, extra=None)
00030         except:
00031             pass
00032         try:
00033             catalog.addColumn(indexName)
00034         except:
00035             pass
00036 
00037         catalog.manage_reindexIndex(indexName)
00038 

Here is the call graph for this function:

Here is the caller graph for this function:

def wicked.at.Extensions.Install.configureWysiwyg (   portal,
  out 
)

Definition at line 6 of file Install.py.

00006 
00007 def configureWysiwyg(portal, out):
00008     props = getToolByName(portal, 'portal_properties')
00009     if not hasattr(props, 'site_properties'): # not plone
00010         return
00011     
00012     editors = props.site_properties.getProperty('available_editors')
00013     if "Kupu" in editors:
00014         # move it up in the list
00015         editors = list(editors)
00016         editors.remove('Kupu')
00017         editors = ['Kupu',] + editors
00018         props.site_properties._updateProperty('available_editors', editors)
00019 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 39 of file Install.py.

00039 
00040 def install(self):
00041     out = StringIO()
00042     configureReferenceCatalog(self, out)
00043     configureWysiwyg(self, out)
00044     reindex = None
00045     pc = getToolByName(self, 'portal_catalog')
00046     if not 'UID' in pc.schema():
00047         pc.addColumn('UID')
00048         reindex = True
00049         
00050     if not 'UID' in pc.indexes():
00051         pc.addIndex('UID', 'FieldIndex')
00052         reindex = True
00053         
00054     pc.manage_reindexIndex('UID')
00055     print >> out, "Successfully installed %s." % config.PROJECTNAME
00056     return out.getvalue()

Here is the call graph for this function:

Here is the caller graph for this function: