Hi can someone tell me why I get this error Error Type: AttributeError Error Value: manage_addZSQLMethod from this python script item_id = "test_DTMLDocument" item_title = "Test DTML Document" item_body = """<dtml-var header>...<dtml-var footer>""" sqlName = "SQL_SELECT_ALL" sqlTitle = "View All" dbName = "dbConn" argumentString = "wid given surname" templateString = "SELECT * FROM clients" context.manage_addDTMLDocument(id=item_id,title=item_title,file=item_body) context.manage_addZSQLMethod(id=sqlName,title=sqlTitle, connection_idÛName,arguments=argumentString, template=templateString) what have I missed? I can get the manage_addDTMLDocument to work ok, but not the manage_addZSQLMethod. Dean
Mmm... I don´t really know, but may be "context" changes when you adds the DTMLDocument. Maybe "conext" is the Document after you adds the document. Try with container.manage_addZSQLMethod(...). Regards. Antonio Carrasco ----- Original Message ----- From: "Dean Grubb" <dean@atrium-online.com.au> To: <zope@zope.org> Sent: Tuesday, February 05, 2002 10:06 AM Subject: [Zope] Python script error when tying to manage_addZSQLMethod Hi can someone tell me why I get this error Error Type: AttributeError Error Value: manage_addZSQLMethod from this python script item_id =test_DTMLDocument" item_title =Test DTML Document" item_body =""<dtml-var header>...<dtml-var footer>""" sqlName =SQL_SELECT_ALL" sqlTitle =View All" dbName =dbConn" argumentString =wid given surname" templateString =SELECT * FROM clients" context.manage_addDTMLDocument(id=em_id,title=em_title,file=em_body) context.manage_addZSQLMethod(id=lName,title=lTitle, connection_idÛName,arguments=gumentString, template=mplateString) what have I missed? I can get the manage_addDTMLDocument to work ok, but not the manage_addZSQLMethod. Dean _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Dean Grubb writes:
Error Type: AttributeError Error Value: manage_addZSQLMethod
from this python script
item_id = "test_DTMLDocument" item_title = "Test DTML Document" item_body = """<dtml-var header>...<dtml-var footer>"""
sqlName = "SQL_SELECT_ALL" sqlTitle = "View All" dbName = "dbConn" argumentString = "wid given surname" templateString = "SELECT * FROM clients"
context.manage_addDTMLDocument(id=item_id,title=item_title,file=item_body) context.manage_addZSQLMethod(id=sqlName,title=sqlTitle, connection_id=dbName,arguments=argumentString, template=templateString)
what have I missed? I can get the manage_addDTMLDocument to work ok, but not the manage_addZSQLMethod. Apparently, your "context" does not have a "manage_addZSQLMethod".
Note that the "official" way to create an object is: an_object_manager.manage_addProduct[a_product_name].a_constructor_in_this_product(...) Read more in <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> if necessary. Dieter
participants (3)
-
Antonio Carrasco -
Dean Grubb -
Dieter Maurer