[Zope] add product question

dean hale dean.hale@sunderland.ac.uk
Wed, 28 May 2003 10:16:10 +0100


Can anyone offer any advice please as i cannot figure it out at all.

Currently we have a form which allows the user to upload images creates 
a DTMLDocument called PageText and it also creates a folder to store 
them in, all in one go.

I have created a simple product and zclass based on DTMLDocument called 
OnlineEdit which does a little extra so would rather use this than the 
DTMLDocument we currently use, however i cannot figure out what to use 
to add it, below may make more sense than above

currently we use below


and i have been trying to call the zclass i did


however receive the error

ErrorType: AttributeError
ErrorValue: online Editor

sorry for the thickness and i hope it makes sense.

here is the full script if it's of any use


import string,re,os

def clonetemplate(self,REQUEST):
     file = REQUEST['file']
     id = string.lower(REQUEST['title'])
     newid = string.replace(id,' ','_')
     ob = self.web_template
     newfolder = self.manage_clone(ob,newid)
     data = gethtml(file)
     if REQUEST['img1'].filename <> '':
     if REQUEST is not None:
         try: parent = self.DestinationURL()
         except: parent=REQUEST['URL1']
     return ''

def gethtml(file):
     htmldata = file.read()
     htmldata = re.sub('.*<body(.*?)>(?i)(?s)', '', htmldata)
     htmldata = re.sub('</body(.*?)>.*(?i)(?s)', '', htmldata)



Dean Hale
Information Services

Web Development Manager
0191 515 2424