[ZPT] permissions getting to python modules?

Chris Curvey chris@chriscurvey.com
Fri, 17 Aug 2001 21:09:08 -0400


I'm hoping someone will give me an "A-ha!" moment here.

I'm trying to get a page to show the current date (e.g. "August 17").  I
was building up my page and came up with this:

<html>
  <head>
    <title tal:content="template/title">The title</title>
  </head>
  <body>
    <span tal:replace="template/title" />

    For the Week of <span tal:define="time modules/time"
    tal:replace="python:time.time()">Date</span>
  </body>
</html>

But when I try to test it, Zope starts asking for username and password
again.  (Not only that, but I can't seem to get to anything anymore, no
matter how many times I put in the right username and password.)

I think I'm missing something in security, but I can't figure out what.
My assumption is that you need special security to call the "time"
module because it's outside of Zope.

-Chris

P.S.  I know that the given code will give me a tuple of time values
instead of time, I'll give extra credit to anyone who can start me down
the path of converting the tuple to "August 17"

--
Chris Curvey
Curvey Consulting
http://www.chriscurvey.com