I want to put a "Last edited on <Zope Object modification date>" in a footer, so that I don't have to think about manually changing the date all the time. I've looked through the docs, but I can't find (or recognize) what I need. And it raises the general question: how do I discover and access the properties of any arbitrary Zope object for binding to variables, manipulation, etc.? TIA. Kirk
<dtml-var bobobase_modification_time> ----- Original Message ----- From: "Kirk Lowery" <klowery@wts.edu> To: <zope@zope.org> Sent: Tuesday, May 28, 2002 11:30 Subject: [Zope] Accessing Zope Object properties
I want to put a "Last edited on <Zope Object modification date>" in a footer, so that I don't have to think about manually changing the date all the time. I've looked through the docs, but I can't find (or recognize) what I need.
And it raises the general question: how do I discover and access the properties of any arbitrary Zope object for binding to variables, manipulation, etc.?
TIA.
Kirk
_______________________________________________ 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 )
Kirk Lowery wrote:
I want to put a "Last edited on <Zope Object modification date>" in a footer, so that I don't have to think about manually changing the date all the time. I've looked through the docs, but I can't find (or recognize) what I need.
And it raises the general question: how do I discover and access the properties of any arbitrary Zope object for binding to variables, manipulation, etc.?
http://www.dieter.handshake.de/pyprojects/zope/DocFinder.html http://www.zope.org/Members/shh/DocFinderEverywhere/
hans wrote:
Kirk Lowery wrote:
I want to put a "Last edited on <Zope Object modification date>" in a footer, so that I don't have to think about manually changing the date all the time. I've looked through the docs, but I can't find (or recognize) what I need.
And it raises the general question: how do I discover and access the properties of any arbitrary Zope object for binding to variables, manipulation, etc.?
http://www.dieter.handshake.de/pyprojects/zope/DocFinder.html http://www.zope.org/Members/shh/DocFinderEverywhere/
This Product is very cool. Thanks! Now...er...one further problem, which is a typical Zope newbie question, I'm sure. When I use "<dtml-var bobobase_modification_time>", it's rendered with the top-level container's modification time, which isn't the same as the lower-level object. So I'm caught by container inheritance. How do I override this, something like "self modification time"? Kirk
On Tue, 28 May 2002, Kirk Lowery wrote:
http://www.dieter.handshake.de/pyprojects/zope/DocFinder.html http://www.zope.org/Members/shh/DocFinderEverywhere/
This Product is very cool. Thanks! Really cool. Debian package as well as for zope-edit is in progress.
Thanks for the nice products Andreas.
Kirk Lowery wrote:
hans wrote:
Kirk Lowery wrote:
I want to put a "Last edited on <Zope Object modification date>" in a footer, so that I don't have to think about manually changing the date all the time. I've looked through the docs, but I can't find (or recognize) what I need.
And it raises the general question: how do I discover and access the properties of any arbitrary Zope object for binding to variables, manipulation, etc.?
http://www.dieter.handshake.de/pyprojects/zope/DocFinder.html http://www.zope.org/Members/shh/DocFinderEverywhere/
This Product is very cool. Thanks!
Now...er...one further problem, which is a typical Zope newbie question, I'm sure. When I use "<dtml-var bobobase_modification_time>", it's rendered with the top-level container's modification time, which isn't the same as the lower-level object. So I'm caught by container inheritance. How do I override this, something like "self modification time"?
Well, I'm rather unfamiliar with bobobase_modification_time, and a wild guess is that its one of the properties of (?unsure) SimpleItem or any of its base classes. So, every object in the ZODB should have one. that means <dtml-var "myObject.bobobase_modification_time()"> should give you the objects time. (DTML resolves names w the namespace "_", seems the first object encountered w nameresolution for bobobase_~ is your root folder). How would I try to solve those riddles: Hunting with a systemsearch search (grep for unix, explorer/search for win) through your zope instance for files containing "def bobobase_modification_time", shows just/lib/python/App/PersistentExtra.py in a class PersistemtUtil. Inspecting this tells that its concerned with persistence (_p_*), ie every persistent object should have a property _p_mtime which bobobase_~ And somehow zodbobjects should inherit bobobase_~ How would I try to solve those riddles: a) hunt through the sources, sorry, often leads you in a maze of twisty little passages, code w 1-letter identifiers (real prgrammers do assembler in any lang), requires familiarity w python (beazly recommended) b) search mailing list archives for bobobase_~ c) search zope.org for bobobase_~ ------------------------------------------------------------- Who's got only a hammer sees the world as a nail hans augustin (software developer) hans@beehive.de beehive elektronische medien GmbH http://www.beehive.de phone: +49 30 847-82 0 fax: +49 30 847-82 299
participants (4)
-
Andreas Jung -
hans -
Kirk Lowery -
Tille, Andreas