From: Dragos Chirila <d.chirila@finsiel.ro>
try like this:
manage_addZMySQLConnection(self, id='dbConnection', title = 'dbConnection', connection_string = configFile.DbConnString)
(If this comes across as html, please let me know. I have checked the "plain text" box in the web client that I am constrained to using from this location) I'm not sure how Dragos meant for his suggestion to be implemented. I've tried different permutations of my code below, and to date have not succeeded in getting the database connector added as a child of my newly-added class. Here is my current code: class MyClass(mxmObjectManager.mxmObjectManager): 'This is the doc string' meta_type='my fake meta type string' id='MyClassInstance' def __init__(self, id): mxmObjectManager.mxmObjectManager.__init__(self, id) def manage_afterAdd(self, containter=None, content=None): self.manage_addZMySQLConnection( id='dbConnection', title = 'dbConnection', connection_string = configFile.DbConnString) def manage_beforeDel(self, container=None, content=None): pass def manage_addAction(self, id=PrinterSite.id, REQUEST=None): 'Add instance to parentObjectManager' mxmObjectManager.addClass(self, id, PrinterSite, REQUEST) Constructors = (mxmObjectManager.manage_addForm, manage_addAction,)
Poor Yorick wrote:
(If this comes across as html, please let me know. I have checked the "plain text" box in the web client that I am constrained to using from this location)
I'm not sure how Dragos meant for his suggestion to be implemented. I've tried different permutations of my code below, and to date have not succeeded in getting the database connector added as a child of my newly-added class. Here is my current code:
Well, you say you weren't successful, but you don't say what happened. So, what happened?! Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
Poor Yorick