[Zope3-checkins] CVS: Products3/psycopgda - browser.py:1.3 configure.zcml:1.2
Stephan Richter
srichter@cosmos.phy.tufts.edu
Wed, 11 Jun 2003 06:27:03 -0400
Update of /cvs-repository/Products3/psycopgda
In directory cvs.zope.org:/tmp/cvs-serv28243/zopeproducts/psycopgda
Modified Files:
browser.py configure.zcml
Log Message:
Make this aadapter behave more like the GadflyDA. Two changes:
- Changed the factory id to 'PsycopgDA'
- Added a menu entry to the connections menu, so that the adapter is
available more naturally.
=== Products3/psycopgda/browser.py 1.2 => 1.3 ===
--- Products3/psycopgda/browser.py:1.2 Fri Feb 7 13:10:27 2003
+++ Products3/psycopgda/browser.py Wed Jun 11 06:27:02 2003
@@ -20,6 +20,5 @@
class PsycopgDAAddView(AdapterAdd):
"""Provide a user interface for adding a Psycopg DA"""
- # This needs to be overridden by the actual implementation
- _adapter_factory_id = "psycopgda"
+ _adapter_factory_id = "PsycopgDA"
=== Products3/psycopgda/configure.zcml 1.1 => 1.2 ===
--- Products3/psycopgda/configure.zcml:1.1 Thu Jan 9 06:38:56 2003
+++ Products3/psycopgda/configure.zcml Wed Jun 11 06:27:02 2003
@@ -1,31 +1,56 @@
<zopeConfigure
- xmlns='http://namespaces.zope.org/zope'
- xmlns:browser='http://namespaces.zope.org/browser'
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser"
>
-<content class=".adapter.PsycopgAdapter">
- <factory id="psycopgda"
- permission="zope.Public" />
- <require permission="zope.Public"
- interface="zope.app.interfaces.rdb.IZopeDatabaseAdapter." />
- <implements interface="zope.app.interfaces.annotation.IAttributeAnnotatable." />
-</content>
-
-<browser:view
- name="zopeproducts.psycopgda"
- for="zope.app.interfaces.container.IAdding."
- class=
- "zopeproducts.psycopgda.browser.PsycopgDAAddView"
- permission="zope.Public">
-
- <browser:page name="+" attribute="add" />
- <browser:page name="action.html" attribute="action" />
-</browser:view>
-
-<browser:menuItem menu="add_component"
- for="zope.app.interfaces.container.IAdding."
- title="Psycopg DA" action="zopeproducts.psycopgda"
- description="A PostgreSQL Database Adapter using the Psycopg driver"/>
+ <content class=".adapter.PsycopgAdapter">
+ <factory
+ id="PsycopgDA"
+ permission="zope.Public"
+ />
+ <require permission="zope.Public"
+ interface="zope.app.interfaces.rdb.IZopeDatabaseAdapter."
+ />
+
+ <implements
+ interface="zope.app.interfaces.annotation.IAttributeAnnotatable."
+ />
+
+ <implements
+ interface=
+ "zope.app.interfaces.services.configuration.IAttributeUseConfigurable"
+ />
+
+ </content>
+
+ <!-- Browser-specific directives -->
+ <browser:view
+ name="zopeproducts.psycopgda"
+ for="zope.app.interfaces.container.IAdding."
+ class=
+ "zopeproducts.psycopgda.browser.PsycopgDAAddView"
+ permission="zope.Public">
+
+ <browser:page name="+" attribute="add" />
+ <browser:page name="action.html" attribute="action" />
+ </browser:view>
+
+ <!-- Menu entry for "add component" menu -->
+ <browser:menuItem menu="add_component"
+ for="zope.app.interfaces.container.IAdding."
+ title="Psycopg DA"
+ description="A PostgreSQL Database Adapter using the Psycopg driver"
+ action="zopeproducts.psycopgda"
+ />
+
+ <!-- Menu entry for "add connection" menu -->
+ <browser:menuItem
+ menu="add_connection"
+ for="zope.app.interfaces.container.IAdding"
+ title="Psycopg DA"
+ description="A PostgreSQL Database Adapter using the Psycopg driver"
+ action="zopeproducts.psycopgda"
+ />
</zopeConfigure>