Fwd: RE: [Zope] Zoo guestbook example.

Markus Kemmerling Markus Kemmerling" <markus.kemmerling@mediaweb.at
Wed, 7 Feb 2001 13:51:04 GMT


****** Forwarded Message Follows *******
>To: "Ignacio Valdes" <ivaldes@hal-pc.org>
>From: "Markus Kemmerling" <markus.kemmerling@mediaweb.at>
>Date: Wed, 7 Feb 2001 11:36:58 +0100
>
>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 )
>> 
>
>
>_______________________________________________
>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 )
>
>