Thanks Markus, I'm working in a production environment so I won't be able to upgrade until 2.4 I tried changing the variables from context to self, but that made it unable to find 'self' unfortunately. I'm clueless about what to do now as this is the first Python I've ever programmed. -- IV Markus Kemmerling wrote:
The examples in the ZB are suppossed to work with Zope 2.3 only. Probably you are using an older version. I got the examples running by replacing 'context' with 'self' (and maybe some other minor changes, that I cant't remember).
Good luck!
Markus Kemmerling
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ignacio Valdes Sent: Wednesday, February 07, 2001 6:09 AM To: zope@zope.org Subject: [Zope] Zoo guestbook example.
Hello all,
I'm working the Zoo guestbook example:
http://www.zope.org/Members/michel/ZB/SimpleExamples.html
and have created all the documents which seem to work fine. The Python method addEntry that drives the actual update of the database I created by doing an add python script then putting the code in just like the example as follows:
""" Create a guest book entry. """ # create a unique document id id='entry_%d' % len(context.objectIds())
# create the document context.manage_addProduct['OFSP'].manage_addDTMLDocument(id, title="", file=comments)
# add a guest_name string property doc=getattr(context, id) doc.manage_addProperty('guest_name', guest_name, 'string')
Syntactically it looks good to Zope, but it has a problem with the 'context' variable and doesn't seem to know what it is. Any idea what I might be doing wrong?
-- IV
_______________________________________________ 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 )