Back to index

plone3  3.1.7
setup.py
Go to the documentation of this file.
00001 '''\
00002 Procedural methods of site setup
00003 '''
00004 
00005 from Products.CMFCore.utils import getToolByName
00006 
00007 def setupMimetype(context):
00008     '''This setup step is needed after Archetypes has been installed.
00009     '''
00010     site = context.getSite()
00011     # Only run step if a flag file is present (e.g. not an extension profile)
00012     if context.readDataFile('plone-app-kss.txt') is None:
00013         return
00014     # register mimetype
00015     mt = getToolByName(site, 'mimetypes_registry')
00016     mt.manage_addMimeType('KSS (Kinetic Style Sheet)', ('text/kss', ), ('kss', ), 'text.png',
00017                        binary=0, globs=('*.kss', ))