[Zope] attributes on a file
Chris Withers
chris at simplistix.co.uk
Tue Sep 6 06:42:47 EDT 2005
Michael wrote:
> could someone please tell me how I would modify the "file library"
> example to store an attribute with the file? (like the guest_name in
> message book)
well, I don't have the example to hand, but my guess would be that
you're looking to do something like:
from AccessControl import getSecurityManager
myfile.manage_addProperty('guest_name',
getSecurityManager().getUser().getId()
'string')
...where myfile is your file object.
That said, try just doing:
myfile.getOwner(), it may do what you want already...
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope
mailing list