Hello together Can anybody tell me, how I can add a ZPT-File in a Class in Python. The file should be in the class after add... What's the different between to add a DTML Document like below: def addDocumentObject(self,id,file,title=''): """ create a DTML Document object """ self.manage_addDTMLDocument(id=id,file=DTMLFile("Products/P01_DownloadFo lderManager/"+file),title=title) addDocumentObject(admin.skin.users,'delUserForm','skin/dtml/delUserForm' ,'delete User') Mit freundlichen GrĂ¼ssen Roger Ineichen ___________________________ Projekt01 GmbH www.projekt01.ch Langackerstrasse 8 6330 Cham phone +41 (0)41 781 01 78 mobile +41 (0)79 340 52 32 fax +41 (0)41 781 00 78 email r.ineichen@projekt01.ch ___________________________ END OF MESSAGE
Roger Ineichen writes:
Can anybody tell me, how I can add a ZPT-File in a Class in Python. The file should be in the class after add... What's the different between to add a DTML Document like below:
def addDocumentObject(self,id,file,title=''): """ create a DTML Document object """
self.manage_addDTMLDocument(id=id,file=DTMLFile("Products/P01_DownloadFo lderManager/"+file),title=title)
addDocumentObject(admin.skin.users,'delUserForm','skin/dtml/delUserForm' ,'delete User') When you read the Zope book (or
<http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> ) you find out that the standard way to instanciate a Zope site building class is object_manage.manage_addProduct[<product_name>].<constructor>(....) But maybe, I misunderstood your question. The analog of "DTMLFile" is "Products.PageTemplates.PageTemplateFile.PageTemplateFile". You can use is similar to "DTMLFile". Dieter
participants (2)
-
Dieter Maurer -
Roger Ineichen