[Checkins] SVN: Products.SQLAlchemyDA/trunk/da.py made wrapper property a selection list

Andreas Jung andreas at andreas-jung.com
Mon Apr 30 03:53:37 EDT 2007


Log message for revision 74908:
  made wrapper property a selection list
  

Changed:
  U   Products.SQLAlchemyDA/trunk/da.py

-=-
Modified: Products.SQLAlchemyDA/trunk/da.py
===================================================================
--- Products.SQLAlchemyDA/trunk/da.py	2007-04-30 07:52:43 UTC (rev 74907)
+++ Products.SQLAlchemyDA/trunk/da.py	2007-04-30 07:53:36 UTC (rev 74908)
@@ -13,6 +13,7 @@
 from OFS.PropertyManager import PropertyManager
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 
+from z3c.sqlalchemy import allSAWrapperNames
 
 class SAWrapper(SimpleItem, PropertyManager):
 
@@ -20,15 +21,20 @@
                      SimpleItem.manage_options
 
     _properties = (
-        {'id' : 'wrapper_name', 'type' : 'string', 'mode' : 'rw'},
+        {'id' : 'sqlalchemy_wrapper_name', 'type' : 'selection', 'mode' : 'rw', 
+         'select_variable' : 'registeredWrappers'},
     )
 
     id = 'sqlalchemy_da'
     meta_type = 'SQLAlchemy Wrapper Integration'
-    wrapper_name = ''
+    sqlalchemy_wrapper_name = ''
 
     security = ClassSecurityInfo()
 
+    def registeredWrappers(self):
+        """ return a list of registered wrapper names """
+        return allSAWrapperNames()
+            
 
 InitializeClass(SAWrapper)
 



More information about the Checkins mailing list