[Checkins] SVN: Products.SQLAlchemyDA/trunk/ - DSN can be passed within the add form

Andreas Jung andreas at andreas-jung.com
Fri Jun 8 11:33:57 EDT 2007


Log message for revision 76506:
  - DSN can be passed within the add form
  - redirect directly to wrapper screen after adding the wrapper
  

Changed:
  U   Products.SQLAlchemyDA/trunk/da.py
  U   Products.SQLAlchemyDA/trunk/pt/addSAWrapperForm.zpt

-=-
Modified: Products.SQLAlchemyDA/trunk/da.py
===================================================================
--- Products.SQLAlchemyDA/trunk/da.py	2007-06-08 15:16:40 UTC (rev 76505)
+++ Products.SQLAlchemyDA/trunk/da.py	2007-06-08 15:33:56 UTC (rev 76506)
@@ -276,13 +276,14 @@
 
 
 
-def manage_addSAWrapper(self, id, title, RESPONSE=None):
+def manage_addSAWrapper(self, id, dsn, title, RESPONSE=None):
     """ create a new SAWrapper instance """
     
     wrapper = SAWrapper(id, title)
+    wrapper.dsn = dsn
     self._setObject(id, wrapper.__of__(self))
     if RESPONSE:
-        RESPONSE.redirect(wrapper.absolute_url() + '/manage_workspace')
+        return RESPONSE.redirect(self._getOb(id).absolute_url() + '/manage_workspace')
     else:
         return wrapper 
 

Modified: Products.SQLAlchemyDA/trunk/pt/addSAWrapperForm.zpt
===================================================================
--- Products.SQLAlchemyDA/trunk/pt/addSAWrapperForm.zpt	2007-06-08 15:16:40 UTC (rev 76505)
+++ Products.SQLAlchemyDA/trunk/pt/addSAWrapperForm.zpt	2007-06-08 15:33:56 UTC (rev 76506)
@@ -34,7 +34,18 @@
 
   <tr>
     <td>
+    <div class="form-label">
+    DSN
+    </div>
     </td>
+    <td>
+      <input type="text" name="dsn" size="40" value=""/>
+    </td>
+  </tr>
+
+  <tr>
+    <td>
+    </td>
     <td   colspan="2">
     <div class="form-element">
     <input class="form-element" type="submit" name="submit" 



More information about the Checkins mailing list