Last change
on this file since 3417 was
2518,
checked in by mylan, 14 years ago
|
#192: Updated configlet verification form
|
-
Property svn:eol-style set to
native
|
File size:
794 bytes
|
Line | |
---|
1 | ## Script (Python) "create_verify_file" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters= |
---|
8 | ##title=Create file for verification |
---|
9 | ## |
---|
10 | |
---|
11 | from Products.CMFCore.utils import getToolByName |
---|
12 | portal = getToolByName(context, 'portal_url').getPortalObject() |
---|
13 | sitemap_view = portal.restrictedTraverse("sitemap_settings") |
---|
14 | isAdded, res = sitemap_view.uploadVerificationFile(context.REQUEST) |
---|
15 | if isAdded: |
---|
16 | state.set(status="success", |
---|
17 | portal_status_message = 'Plone Google Sitemap updated.') |
---|
18 | else: |
---|
19 | state.set(status="failure", |
---|
20 | portal_status_message = 'Error on file upload: "%s"' % res) |
---|
21 | #context.plone_utils.addPortalMessage(_(u'Please correct the indicated errors.'), 'error') |
---|
22 | |
---|
23 | return state |
---|
Note: See
TracBrowser
for help on using the repository browser.