page contents are not refreshed
steve at holdenweb.com
Wed Sep 13 20:59:56 CEST 2006
Gleb Rybkin wrote:
> when running apache, mod_python in windows.
> This looks pretty strange. Creating a simple python file that shows
> current time will correctly display the time in apache the first time,
> but freezes afterwards and shows the same time on all subsequent clicks
> as long as the file is not modified.
> Any ideas what's wrong? Thanks.
> from mod_python import apache
> from time import strftime, gmtime
> curtime = strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime())
> def handler(req):
> req.content_type = "text/plain"
> return apache.OK
Try moving the assignment to curtime inside the handler function so it
isn't just executed once when the module is imported ...
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list