-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
Toni Mueller wrote: > I'd like to talk to (external or internal) SQL databases and access > files on the file system (reading and writing raw data with Python) > from within a custom product. Unfortunately, in all documentation I > found so far, this whole area is not described in too much detail. > > So far, I thought that writing External Methods for accessing the > external files etc. would be the way to go, but I don't quite know how > to then call special Zope objects from these methods, or how to ship > things like database connections and sql methods in the file system, > together with the product, and hopefully avoid making a huge bloat out > of the intallation script of the product which could, in theory, set it > all up within the CPS instance where it's supposed to run? > > What's the best way to go about such a problem, especially if External > Methods are really deprecated, or am I barking up the wrong tree? > It's really depending on the use case you're having : 1. You want your attached files within CPS to be stored on the filesystem: For storing binaries (such files) on the filesystem you may use the "Disk File Field". Visit the portal_schemas/file/ and change the 'normal' "CPS File Field" (named `file`) as a 'CPS Disk File Field'. It will work transparently and stores binaries on the filesystem for the File content type. (note, you can do this for other types as well) 2. You want to have views on external filsystem folders : You can try out : https://svn.nuxeo.org/trac/pub/browser/CPSLocalFS/trunk/ We didn't use it for a while, so it might be broken... Feel free to try out and report bugs if they are. 3. You want to talk with an SQL database from CPS. You can use the standard Zope DAs corresponding to your database (check zope.org) And add ZSQL Method within the skins directories. 4. You want to mirror data from your CPS to an external SQL database. You can use the CPS event service and code a specific subscriber related to your application that listen to events and stores filtered information within the SQL database. 5 . You wanna change ZODB over SQL Here, it's more tricky ;) I suggest you to check what Florent wrote in his blog over there : http://blogs.nuxeo.com/sections/blogs/florent_guillaume/2005_08_11_object_relational If you got more questions feel free to ask. Cheers, J. - -- Julien Anguenot | Nuxeo R&D (Paris, France) CPS Platform : http://www.cps-project.org Zope3 / ECM : http://www.z3lab.org mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFDQm2sGhoG8MxZ/pIRAiaFAJ98Hk/zuh9SCno2Qf4GD72eeeWjfACeMNXH qFrPuOrby3zjW48KbBhqzEA= =fnFE -----END PGP SIGNATURE----- _______________________________________________ cps-users mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/cps-users
