[Zope3-dev] Calling persistent function
Jeffrey P Shell
jeff at bottlerocket.net
Tue Feb 3 16:46:13 EST 2004
On Jan 24, 2004, at 7:30 AM, Steve Alexander wrote:
>
>> One problem I have with that is that
>> modules['time'].asctime() is forbidden in zpt. How do
>> I put the time and date in a zpt template?
>
> Make it not forbidden in zpt?
>
> I'd also like to see a <script> tag work for this, so that python code
> can be embedded in ZPTs in a natural kind of way.
>
> You shouldn't need to play with utilities to get this simple task done.
You shouldn't need a script tag to get this done either with ZPT::
<h1 tal:content="modules/time/asctime">[current time]</h1>
versus::
<h1>
<script type="text/server-python">
import time
print time.asctime()
</script>
</h1>
Again - if this is the norm, then we are regressing. JSP and ASP have
moved beyond this style, and by the time Zope 3 actually does something
useful, even PHP will have finally separated itself from between its
core programming language features and use as a templating system.
I know, I know, I know, we've been through this fight before and I'm
not going to fight it again. My fears over Zope 3 at the moment are
sadly greater than my intrigue, because I feel either insanely neutered
('content-space', where I haven't gotten anything besides a folder to
do its job), or insanely overwhelmed. It's taken me until yesterday to
finally figure out the service registration/activation thing.
:\
More information about the Zope3-dev
mailing list