[Zope] Python script error when tying to manage_addZSQLMethod
Dieter Maurer
dieter@handshake.de
Tue, 5 Feb 2002 23:03:31 +0100
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