Presentation is loading. Please wait.

Presentation is loading. Please wait.

EIONET European Environment Information and Observation Network * * * EIONET Training Zope absolute beginner's course Built-in.

Similar presentations


Presentation on theme: "EIONET European Environment Information and Observation Network * * * EIONET Training Zope absolute beginner's course Built-in."— Presentation transcript:

1 EIONET European Environment Information and Observation Network http://www.eionet.eu.int/ * * * EIONET Training Zope absolute beginner's course Built-in tools (presentation and best practice): Database connectivity: MySQL and LDAP Monday, 27 Oct 2003 - Tuesday, 28 Oct 2003 Hermann Peifer, Project Manager EIONET Data Flow Version 0.32003-10-07

2 2 Example #1: Zope and MySQL ZMySQLDA Database Adapter Product ZSQLMethods ZSQL Methods Product

3 3 ZMySQLDA and ZSQLMethods ZMySQLDA is the MySQL database adapter product for ZOPE. The Z MySQL database adapter product requires that the Python MySQLmodule extension is installed. Z SQL Method Object: Query relational databases with SQL Z SQL Methods allows you to access data in SQL databases. Z SQL Methods define and call SQL statements on databases which are defined by database adapter objects. To create a new Z SQL Method you will need to setup a database adapter first.

4 4 MySQL Demo Folder http://peifer.eionet.eu.int/wdbgw/ (Use the View DTML Source function) http://peifer.eionet.eu.int/wdbgw/ ZSQLMethods to access the database ZMySQLDA Database Connection DTML Methods To render the ZSQL query results on the Zope site

5 5 Z SQL Method at /wdbgw/select_country_body

6 6 Available GWbodies Country ID Country Name No. of bodies "> DTML Method at /wdbgw/index_html (Countries and No. of Gwbodies) HTML table with column headers DTML loop using ZSQL Method to render the query results

7 7 Search results on the Zope web site

8 8 Example #2: Zope and LDAP ZLDAPConnection Database Adapter ZLDAPMethods ZLDAP Filter Methods

9 9 ZLDAPConnection and ZLDAPMethods ZopeLDAP Product consists of 2 products in the same release Downloadable at: http://www.zope.org/Members/jshell/ZopeLDAP http://www.zope.org/Members/jshell/ZopeLDAP 1. ZLDAPConnection is the LDAP database adapter product. For managing connections to LDAP Servers and returning Zope-ish entry objects. It needs David Leonard's ldapmodule, from http://python-ldap.sourceforge.net/ 2. ZLDAP Filter Methods for querying LDAP Servers ZLDAP Filter Methods allows you to browse an LDAP database. Known problems with the transactional behaviour, but connection can be run in a non-transactional mode.

10 10 ZLDAP Database Connection DTML Documents to render the ZLDAP query results on the Zope site ZLDAP Methods to search in the LDAP database LDAP Search Folder http://directory.eionet.eu.int/quick/ http://directory.eionet.eu.int/quick/

11 11 LDAP Filter at /quick/search_users

12 12 No UserID Name Email Organisation DTML Document at /quick/list_users (Results of users search) HTML table with column headers DTML loop using ZLDAP Method to render the query results

13 13 Search results on the Zope web site


Download ppt "EIONET European Environment Information and Observation Network * * * EIONET Training Zope absolute beginner's course Built-in."

Similar presentations


Ads by Google