13 Sep
2002
13 Sep
'02
2:02 p.m.
jbr@FIZ-Karlsruhe.DE wrote:
Hello,
I am trying to enhance the load_site.py script:
Files with suffix .zpt should be created as a zope page template file.
I am using Zope 2.5.1 on Unix, I copied load_site.py to load_site_fiz.py and added the function upload_zpt
def upload_zpt(object, f): dir, name = os.path.split(f) f=open(f)
call(object.manage_addProduct['PageTemplates'].manage_addPageTemplate( id=name, title='', text=f))
Untested: call(object.manage_addProduct['PageTemplates'].manage_addPageTemplate, id=name, title='', text=f) This is derived from how call(f,*args,**kw) does it's job. It applies the arguments for you. cheers, oliver