Hi there people! This post is the second problem that i got.
I want to make a Standalone View that has a form, make a query and show another view with the results. I know it must be done with zsql methods. I did it through the ZMI. But know, i want to make a product that include the ZSQL Methods and create the Zope Database Connection. I have followed: http://plone.org/documentation/how-to/add-file-system-zsql-method, http://plone.org/documentation/how-to/move-your-zsql-methods-to-the-filesystem and http://docs.zope.org/zope2/zope2book/source/RelationalDatabases.html, among other things. The thing is that when i install the product, it doesn't install the Z Database Connection and it fails with ValueKeyError when trying to use the ZSQL. This is what i have done so far in my product: - profiles/ - default/ - rolemap.xml - import-steps.xml: <?xml version="1.0"?> <import-steps> <import-step id="goldmine-connect" version="20090512-01" handler="acmkms.goldmine.setuphandlers.createDBConnection" title="Crear conexion de base de datos"> </import-step> </import-steps> - zsql/ - configure.zcml (just have the defult) <configure xmlns="http://namespaces.zope.org/zope" xmlns:browser="http://namespaces.zope.org/browser" i18n_domain="acmkms.goldmine"> </configure> - goldmine_search.zsql (it's not worth to tell what's in here) - __init__.py (empty) - configure.zcml: <configure xmlns="http://namespaces.zope.org/zope" xmlns:five="http://namespaces.zope.org/five" xmlns:genericsetup="http://namespaces.zope.org/genericsetup" i18n_domain="acmkms.goldmine"> <!-- Include the sub-packages that use their own configure.zcml files. --> <include package=".browser" /> <include package=".zsql" /> <!-- Register the installation GenericSetup extension profile --> <genericsetup:registerProfile name="default" title="Goldmine" directory="profiles/default" description="Provee interfaces y los requerimientos para realizar consultas a Goldmine desde ACMKMS." provides="Products.GenericSetup.interfaces.EXTENSION" /> </configure> - __init__.py (empty) - setuphandlers.py def createDBConnection(portal): portal.manage_addProduct['ZMySQLDA'].manage_addZMySQLConnection('goldmineConect','Conexion MySQL Goldmine', 'bd user password', 'YES') Does anyone know where may i be wrong or what i must do in order to make it work? Greetings, -- View this message in context: http://n2.nabble.com/How-to-create-Zope-Database-Connections-and-Methods-tp2886370p2886370.html Sent from the Product Developers mailing list archive at Nabble.com. _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
