product development and zsql
hello: so i have a very basic product. i would like after the __init__ is called and the object is created is to write its contents, id, title etc etc to a mysql database. lo-and-behold, there exists manage_addAfter(self, container=None, context=None). But, now the question becomes, how do i call a zsqlmethod from my method inside of my product? do i import ZSQLMethod and create one on the fly? Can one be sitting somewhere in my Product directory? help? thanks, patrick sullivan __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com
patrick sullivan wrote:
so i have a very basic product. i would like after the __init__ is called and the object is created is to write its contents, id, title etc etc to a mysql database.
lo-and-behold, there exists manage_addAfter(self, container=None, context=None). But, now the question becomes, how do i call a zsqlmethod from my method inside of my product? do i import ZSQLMethod and create one on the fly? Can one be sitting somewhere in my Product directory?
help?
http://zope.org/Members/jccooper/extzsql makes it easy to have ZSQL methods in filesystem products. Even if you don't want to use it, you can see the alternate way to do it in the README. Don't be scared by the low version number. It just hasn't needed any fixing since being released. (Apologies for the formatting: it's not written in STX, but is being interpretted that way.) --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
patrick sullivan wrote at 2004-2-23 13:10 -0800:
... there exists manage_addAfter(self, container=None, context=None). But, now the question becomes, how do i call a zsqlmethod from my method inside of my product? do i import ZSQLMethod and create one on the fly?
This would be one option -- not the one I would use.
Can one be sitting somewhere in my Product directory?
Someone told you about a special product that may make this possible. I would use one of the following options: * create a Z SQL Method once and make the resulting object a class level attribute (or maybe a persistent instance level attribute). * access the Z SQL Method via acquisition -- Dieter
participants (3)
-
Dieter Maurer -
J. Cameron Cooper -
patrick sullivan