source: products/qPloneGoogleSitemaps/trunk/skins/qPloneGoogleSitemaps/gsm_create_verify_file.cpy @ 41

Last change on this file since 41 was 1, checked in by myroslav, 18 years ago

Building directory structure

File size: 838 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=verify_filename
8##title=Create file for verification
9##
10
11from Products.CMFCore.utils import getToolByName
12from Products.qPloneGoogleSitemaps.utils import BadRequestException
13portal = getToolByName(context, 'portal_url').getPortalObject()
14try:
15    portal.manage_addFile(verify_filename,title='Verification File')
16    portal[verify_filename].manage_addProperty('CreatedBy','qPloneGoogleSitemaps','string')
17except BadRequestException:
18    pass
19props = getToolByName(context,'portal_properties').googlesitemap_properties
20props.manage_changeProperties(verification_filename = verify_filename)
21
22
23return state.set(portal_status_message = 'Plone Google Sitemap updated.')
Note: See TracBrowser for help on using the repository browser.