It doesn't work with DiskStore:
----<----
import os
import sys
import web
# URL pattern.
urls = (
'/', 'index',
)
app = web.application(urls, globals()).wsgifunc()
curdir = os.path.dirname(__file__)
session = web.session.Session(app, web.session.DiskStore(curdir + '/'
+ 'sessions'),)
# PYTHON_EGG_CACHE
os.environ['PYTHON_EGG_CACHE'] = '/tmp'
class index:
def GET(self):
return "Hello, world."
----<-----
Apache error_log:
----<-- error_log --
[Wed Oct 22 10:04:56 2008] [info] mod_wsgi (pid=4128): Create
interpreter 'IT-MichaelZh.istc.ibm.com|/iredadmin'.
[Wed Oct 22 10:04:56 2008] [info] [client 127.0.0.1] mod_wsgi
(pid=4128, process='', application='IT-MichaelZh.istc.ibm.com|/
iredadmin'): Loading WSGI script '/var/www/iredadmin/iRedAdmin.wsgi'.
[Wed Oct 22 10:04:56 2008] [error] [client 127.0.0.1] mod_wsgi
(pid=4128): Target WSGI script '/var/www/iredadmin/iRedAdmin.wsgi'
cannot be loaded as Python module.
[Wed Oct 22 10:04:56 2008] [error] [client 127.0.0.1] mod_wsgi
(pid=4128): Exception occurred processing WSGI script '/var/www/
iredadmin/iRedAdmin.wsgi'.
[Wed Oct 22 10:04:56 2008] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Wed Oct 22 10:04:56 2008] [error] [client 127.0.0.1] File "/var/
www/
iredadmin/iRedAdmin.wsgi", line 18, in ?
[Wed Oct 22 10:04:56 2008] [error] [client 127.0.0.1] session =
web.session.Session(app, web.session.DiskStore(curdir + '/' +
'sessions'),)
[Wed Oct 22 10:04:56 2008] [error] [client 127.0.0.1] File "/usr/
lib/
python2.4/site-packages/web/session.py", line 51, in __init__
[Wed Oct 22 10:04:56 2008] [error] [client 127.0.0.1]
app.add_processor(self._processor)
[Wed Oct 22 10:04:56 2008] [error] [client 127.0.0.1] AttributeError:
'function' object has no attribute 'add_processor'
----<----
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---