Graham Dumpleton
graham.dumpleton at gmail.com
Fri Aug 29 21:06:14 EDT 2008
Yes. From memory has to be caled 'req', not 'request'. Graham 2008/8/30 Johannes Bauer <dfnsonfsduifb at gmx.de>: > Hello list, > > I'm still using Apache 2.2.3 + mod_python 3.2.10 + mod_auth (as a workaround > to the mod_digest bug, I just *really* want to avoid having to recompile > mod_python). Playing around I'd now like to access POST variables passed to > a document. Currently, I had my index function defined as > > def index(): > > which I changed to > > def index(request): > > Now I'm getting: > > [Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler > mod_python.publisher: Traceback (most recent call last):, referer: > https://myhostname.mydomain.com/network/doc_hostlist.py > [Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler > mod_python.publisher: File > "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in > HandlerDispatch\n result > = object(req), referer: > https://myhostname.mydomain.com/network/doc_hostlist.py > [Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler > mod_python.publisher: File > "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line 213, in > handler\n published = > publish_object(req, object), referer: > https://myhostname.mydomain.com/network/doc_hostlist.py > [Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler > mod_python.publisher: File > "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line 412, in > publish_object\n retu > rn publish_object(req,util.apply_fs_data(object, req.form, req=req)), > referer: https://myhostname.mydomain.com/network/doc_hostlist.py > [Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler > mod_python.publisher: File > "/usr/lib/python2.4/site-packages/mod_python/util.py", line 439, in > apply_fs_data\n return obj > ect(**args), referer: > https://myhostname.mydomain.com/network/doc_hostlist.py > [Sat Aug 30 01:48:39 2008] [error] [client 192.168.1.2] PythonHandler > mod_python.publisher: TypeError: index() takes exactly 1 argument (0 given), > referer: https://myhostname.mydomain.com/network/d > oc_hostlist.py > > Am I doing somethign wrong? > > Regards, > Johannes > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|