X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/41b0ce79349f032cab45b959dab4a67c0820b9c8..9fa2baa127ef53fca03011ce2295e9306c40a306:/profiles/photo/various.py?ds=inline diff --git a/profiles/photo/various.py b/profiles/photo/various.py index 8141a6d..e3dcb65 100644 --- a/profiles/photo/various.py +++ b/profiles/photo/various.py @@ -60,11 +60,11 @@ def doActionForOrSkip(*args, **kw) : except WorkflowException : pass # home page -constructOrSkip( 'Document', site, 'index_html' - , title = translate('Home') - , text_format='html' - , text=site.default_home_page_content()) -doActionForOrSkip(site.index_html, 'direct_publish') +# constructOrSkip( 'Document', site, 'index_html' +# , title = translate('Home') +# , text_format='html' +# , text=site.default_home_page_content()) +# doActionForOrSkip(site.index_html, 'direct_publish') # default folders constructOrSkip('Plinn Folder', site, 'Members', title = translate('Members')) @@ -102,13 +102,16 @@ caltool = getToolByName(site, 'portal_calendar') caltool.configureTool(['created', 'modified', 'DateTimeOriginal'], [9, 18]) pimtool = getToolByName(site, 'portal_image_manipulation') -pimtool.manage_addProduct['OFSP'].manage_addFolder('image') -pimtool.manage_addProduct['OFSP'].manage_addFolder('tile') +if not pimtool.hasObject('image') : + pimtool.manage_addProduct['OFSP'].manage_addFolder('image') +if not pimtool.hasObject('tile') : + pimtool.manage_addProduct['OFSP'].manage_addFolder('tile') ctool = getToolByName(site, 'portal_catalog') -ctool.manage_addProduct['ProxyIndex'].manage_addProxyIndex('position', - extra = { 'idx_type' : 'FieldIndex' - , 'value_expr' : 'python:object.getParentNode().getObjectPosition(object.getId())'}) +if not 'position' in ctool.indexes() : + ctool.manage_addProduct['ProxyIndex'].manage_addProxyIndex('position', + extra = { 'idx_type' : 'FieldIndex' + , 'value_expr' : 'python:object.getParentNode().getObjectPosition(object.getId())'}) # Caches HTTPCache = site.HTTPCache