How do I extend a ZClass? Overwrite general stuff that I want to personalize for my own site. Can I just create a new ZClass with my Product as the Base Class? and then create objects with the same ids. Will that do it? Then I'll have to create a ZClass with a different id and meta type and that will complicate things. I have the Beehive ebook about ZClasses but that didn't help. Cheers, Peter
Peter Bengtsson writes:
How do I extend a ZClass? Overwrite general stuff that I want to personalize for my own site. I think, you can do this, if the original ZClass is redistributable and fully configurable.
Can I just create a new ZClass with my Product as the Base Class? and then create objects with the same ids. You cannot use the same id in the same product.
On the other hand, there was evidence on the mailing list that ZClasses break when the inherit from base classes in different product and are then exported/imported.
Will that do it? Then I'll have to create a ZClass with a different id and meta type and that will complicate things. Either directly override (this will make it more complex when you want to upgrade later to a new ZClass version) or derive from the ZClass in the same product (this means a new id).
Dieter
Hi Peter, --On Montag, 2. Juli 2001 11:07 +0200 Peter Bengtsson <mail@peterbe.com> wrote:
How do I extend a ZClass? Overwrite general stuff that I want to personalize for my own site.
This is straigt forward: use the ZClass as base class.
Can I just create a new ZClass with my Product as the Base Class? and then create objects with the same ids. Will that do it? Then I'll have to create a ZClass with a different id and meta type and that will complicate things.
Thats the way to do it. Your python product does not even need to register for objectmanager, so you can make sure it has to be extendet with TTW ZClass. (I used it to avoid including html into filesystem, instead I provide only stubs in the python product and make the management interface and user interface thru the web with dtml and stuff (preferably ZPT nowadays) HTH Tino Wildenhain
I have the Beehive ebook about ZClasses but that didn't help.
Cheers, Peter
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
How do I extend a ZClass? Overwrite general stuff that I want to personalize for my own site.
This is straigt forward: use the ZClass as base class.
Can I just create a new ZClass with my Product as the Base Class? and then create objects with the same ids. Will that do it? Then I'll have to create a ZClass with a different id and meta type and that will complicate things.
Thats the way to do it. Your python product does not even need to register for objectmanager, so you can make sure it has to be extendet with TTW ZClass. (I used it to avoid including html into filesystem, instead I provide only stubs in the python product and make the management interface and user interface thru the web with dtml and stuff (preferably ZPT nowadays)
I don't get it! There are no python products here. Only ZClasses. I didn't get any wiser from your mail to be honest, but I have not had any good advice so far so overwriting with a new product has to be the way forward. Cheers, Peter
HTH Tino Wildenhain
I have the Beehive ebook about ZClasses but that didn't help.
Cheers, Peter
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Dieter Maurer -
Peter Bengtsson -
Tino Wildenhain