[Zope] Create objects of MyClass

Serg serg at dunrose.ru
Fri Mar 12 08:41:19 EST 2004


I have trivial class:
<file MyClass.py>:
from OFS import SimpleItem
from Globals import DTMLFile

def manage_addMyClass(self, id, REQUEST):
    "add"
    a=MyClass(id)
    self._setObject(id,a)
    if REQUEST:
       return self.manage_main(self, REQUEST)

manage_addMyClassForm=DTMLFile('dtml\manage_addMyClassForm',globals())

class MyClass(SimpleItem.SimpleItem):
    "minimal object"
    meta_type='MyClass'
    def __init__(self, id):
        "init"
        self.id=id
     
I can add objects of MyClass through ZMI. 
How can I add some object through my own interface: for example, on button click on DTML form?

Regards,
Serg.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20040312/35a94377/attachment.html


More information about the Zope mailing list