Elvis and Zope : Is the Elvis Lives tutorial a mistake?
Newbies to Zope are encouraged to work through the Elvis Lives tutorial I completed Elvis Lives DTML tutorial about a year ago and have been dabbling in Zope/DTML fairly bumpily since. The high priests of code say forget DTML and give very solid reasons for using Zope Page Templates and incorporating some python scripts when necessary. The major reason they argue is that the code will be clean and easy to maintain, DTML can quickly become a confused mess when you go back to update or make a change. Python they encourage is a good first programming language to learn. Zope is moving away from DTML towards ZPT so perhaps it's time recast Elvis into a ZPT tutorial format. Many Zope newbies come from a design or html background it would be nice for us to be pointed in the right direction from the start. Waiting at traffic lights in Beale St Memphis I had a near Elvis experience. I heard Elvis and a woman talking behind me. I turned around and saw a fat tall bald guy in his sixties chatting to his partner. On my second day in Memphis I realised nearly all local men spoke like Elvis. I tried to discover Zope Zen via DTML but haven't quite made it. With a good Elvis Lives ZPT tutorial I may not only be able to hear Elvis I may be able to see him as well :) Jan Smith webmster OzZope - Australia http://www.ozzope.org
When I call the '&dtml-size' or '<dtml-var (get_)size>' the bytesize is displayed. When using the ZMI U get a MB or KB recalculation of the filesize. Can I call this recalculation from within a document? Or do I have to write a script myself? TIA Roel.
all those management screens live on the filesystem and are discoverable with filesystem tools. grep is your friend. take a look at <zope>/lib/python/OFS/dtml/main.dtml. all you need to do is division by 1024 to get a KB value or by 1048576 (1024*1024) for a MB value. jens On Monday, June 3, 2002, at 06:44 , Roel Van den Bergh wrote:
When I call the '&dtml-size' or '<dtml-var (get_)size>' the bytesize is displayed. When using the ZMI U get a MB or KB recalculation of the filesize. Can I call this recalculation from within a document? Or do I have to write a script myself?
TIA Roel.
participants (3)
-
Jan Smith -
Jens Vagelpohl -
Roel Van den Bergh