Дмитрий Курилов
dmkurilov at mail.ru
Wed Jan 12 01:21:17 EST 2005
Hello! I'm getting started to learn modpython. I have done everything as said in docs. So, I can use apache and util, but when I'd tryed to use Session: ================================================ from mod_python import apache from mod_python import util from mod_python import Session def handler(req): sess=Session.Session(req) req.content_type = "text/html" fk = util.FieldStorage(req) req.write("OK") return apache.OK ================================================ I get error: ================================================ Mod_python error: "PythonHandler new" Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/usr/local/www/billing/new/new.py", line 23, in handler req.content_type = "text/html" AttributeError: 'module' object has no attribute 'BaseSession' ================================================ Temporally, I've solve this problem by adding <input name="id" type="hidden" value="%(id)s"> in every form on site. But it's not good solution. Please, give me an advise how to solve this problem... Thank you, Dmitriy Kurilov. dmkurilov at mail . ru
|