Last change
on this file since 3218 was
225,
checked in by mylan, 18 years ago
|
Cleaned and equalized with Plone 2.0.5 version patch.py & utils.py
|
File size:
744 bytes
|
Rev | Line | |
---|
[198] | 1 | from Products.qPingTool.config import SITES_LIST |
---|
| 2 | |
---|
| 3 | def setupVarious(context): |
---|
| 4 | |
---|
| 5 | # Ordinarily, GenericSetup handlers check for the existence of XML files. |
---|
| 6 | # Here, we are not parsing an XML file, but we use this text file as a |
---|
| 7 | # flag to check that we actually meant for this import step to be run. |
---|
| 8 | # The file is found in profiles/default. |
---|
| 9 | |
---|
| 10 | if context.readDataFile('qPingTool_various.txt') is None: |
---|
| 11 | return |
---|
| 12 | |
---|
| 13 | # Add additional setup code here |
---|
| 14 | portal = context.getSite() |
---|
| 15 | existent_sites = portal.portal_pingtool.objectIds() |
---|
| 16 | for site in SITES_LIST: |
---|
| 17 | if not site[0] in existent_sites: |
---|
[225] | 18 | portal.portal_pingtool.invokeFactory(id = site[0], type_name = "PingInfo", title = site[1], url = site[2]) |
---|
[198] | 19 | |
---|
Note: See
TracBrowser
for help on using the repository browser.