RedTurtle - SQL Contents
It introduces two archetypes to your Plone site:
With this contents you can display the data returned by the queries into Plone pages.
The SQLFolder object is globally addable and can contain SQLQuery objects. The SQLFolder has a connection_url field where you can specify how to connect to an external DB through SQLAlchemy. Please take a look to the SQLAlchemy documentation).
Add redturtle.sqlcontents to the egg section of your instance:
In order to make the connection to your database server of choice effective you may need to install (using systm tools or buildout) the proper libraries, e.g:
In older Plone (previous to version 3.3.2) you need to do the same with the zcml section.
redturtle.sqlcontens is a dangerous package.
Read carefully the documentation before using it. Even if this package is developed to execute "SELECT" queries, it accepts any kind of query without validation. In the current development state you can even DROP stuff from your DB, and this is dangerous and evilish.
SECURITY HINT: it is better, when possible to access the external DB with a read only account. This can save the world!
Do not query large amount of data or blobs, redturtle.sqlcontents is not designed for that task!
Be aware that long queries or network problems can lock your instance threads!
In a hurry? Add it to your Download Basket!
What's New in This Release:
- Fixed setup.py to correctly declare Products.DataGridField dependency (thanks to Olav Peeters for pointing it out) [ale-rt]