[Zope3-Users] Disappearing dictionary. Upon restart, dictionary
resets.
Dominik Huber
dominik.huber at perse.ch
Mon Sep 26 03:18:48 EDT 2005
Alec Munro wrote:
>I've tried it with PersistentDicts and PersistentMappings, and no luck.
>It's very odd, I think there must be some fundamental step towards the
>use of a mapping in Zope that I'm missing.
>
>
The fundamental step to provide persistency is to derive the target
classes from persistent.Persistent. Like Tom Dossis suggested:
from persistent import Persistent
from persistent.dict import PersistentDict
class Demo(Persistent):
def __init__(self):
self.d = PersistentDict()
Regards,
Dominik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dominik.huber.vcf
Type: text/x-vcard
Size: 154 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20050926/c60726cd/dominik.huber.vcf
More information about the Zope3-users
mailing list