Last change
on this file since 1570 was
1570,
checked in by liebster, 14 years ago
|
Added reinstall profile and removed using content_types_seoprops_enabled propery in seo_properties
|
-
Property svn:eol-style set to
native
|
File size:
1.0 KB
|
Line | |
---|
1 | from Products.CMFCore.utils import getToolByName |
---|
2 | from quintagroup.seoptimizer.config import PROJECT_NAME |
---|
3 | |
---|
4 | def install(portal, reinstall=False): |
---|
5 | setup_tool = getToolByName(portal, 'portal_setup') |
---|
6 | setup_tool.setBaselineContext('profile-%s:uninstall'%PROJECT_NAME) |
---|
7 | if reinstall: |
---|
8 | setup_tool.setBaselineContext('profile-%s:reinstall'%PROJECT_NAME) |
---|
9 | setup_tool.runAllImportStepsFromProfile('profile-%s:reinstall'%PROJECT_NAME) |
---|
10 | return "Ran reinstall steps." |
---|
11 | else: |
---|
12 | setup_tool.setBaselineContext('profile-%s:uninstall'%PROJECT_NAME) |
---|
13 | setup_tool.runAllImportStepsFromProfile('profile-%s:default'%PROJECT_NAME) |
---|
14 | return "Ran all install steps." |
---|
15 | |
---|
16 | def uninstall(portal, reinstall=False): |
---|
17 | setup_tool = getToolByName(portal, 'portal_setup') |
---|
18 | setup_tool.setBaselineContext('profile-%s:uninstall'%PROJECT_NAME) |
---|
19 | if reinstall: |
---|
20 | return "Ran reinstall steps." |
---|
21 | else: |
---|
22 | setup_tool.runAllImportStepsFromProfile('profile-%s:uninstall'%PROJECT_NAME) |
---|
23 | return "Ran all uninstall steps." |
---|
Note: See
TracBrowser
for help on using the repository browser.