mò
'á¸Ec @ sÕ d Z d e Z d d d !Z d k l Z l Z d k Z d k Z d k Z d k Z
d k Z d k l
Z
e
i i i i Z h Z e i ƒ Z e Z e i d e ƒ ƒ Z d d d „ Z d
e i f d „ ƒ YZ d S( t GadflysK %s Database Connection
$Id: DA.py 40218 2005-11-18 14:39:19Z andreasjung $s $Revision: 1.16 $i iþÿÿÿ( s DBs manage_DataSourcesN( s
BadRequests dtml/connectionAddc C sD | i | t | | | | ƒ ƒ | d j o | i | | ƒ Sn d S( s Add a DB connection to a folderN(
t selft
_setObjectt idt
Connectiont titlet
connectiont checkt REQUESTt Nonet manage_main( R R R R R R ( ( t4 /data/zmath/zope/lib/python/Products/ZGadflyDA/DA.pyt manage_addZGadflyConnection s
R c B su t Z d Z e Z d e Z d e Z Z d e Z e i d e
ƒ d e ƒZ d „ Z
d „ Z d „ Z d „ Z RS(
t s %s_database_connections Z %s Database Connections misc_/Z%sDA/conns dtml/connectionEditt data_sourcesc C s" t | d ƒ o | i i Sn d S( Nt _v_database_connectiont ( t hasattrR R t opened( R ( ( R t connected4 s c C sN t i d ƒ | ƒ } t | d ƒ o | i i o d | } n d | } | S( Nt title_and_idR s %s, which is connecteds2 %s, which is not connected( t _Connectiont inheritedAttributeR t sR R R ( R R ( ( R R 9 s
c C sN t i d ƒ | ƒ } t | d ƒ o | i i o d | } n d | } | S( NR R s %s (connected)s* %s ( not connected)( R R R R R R R ( R R ( ( R t title_or_idB s
c C sÌ t i ƒ z° t } | i | ƒ o1 | | } | _ | i p | i ƒ n | Sn zW y t
| ƒ | _ | |