|
emf
i at mindlace.net
Tue May 27 13:30:44 EST 2003
I'm trying to make a simple function work using the publisher; I get a
404 if I try to access a function in the method I want to use.
Here is what I think should be the appropriate entry in my <VirtualHost>
directive:
<Directory /slideshow/>
AddHandler python-program .py
#I added to the python path in frustration...
PythonPath "sys.path+['/home/mindlace/site/slideshow']"
PythonHandler mod_python.publisher
PythonDebug on
</Directory>
This is (the relevant portion of) slide_view.py:
body = ("<html><head><title>resolution</title>"
"<body><p>The resolution is %s</p></body>"
"</html>")
def showResolution(req):
if 'Cookie' in req.headers_in:
Cookies = SmartCookie().load(req.headers_in['Cookie'])
if 'resolution' in Cookies:
resolution = Cookies['resolution'].split('x')
else:
resolution = "Not Found"
return body % resolution
So why does this do nothing?
http://mindlace.net/slideshow/slide_view.py/showResolution
Thanks for any pointers,
~mindlace
|