Diener, Edward
Edward.Diener at loyaltyworks.com
Mon May 10 17:18:23 EST 2004
The PSP page, rx/rx.psp, is: <% import rxreport %> <html> <body> <form action="/rx/rxreport.py/HandleLogin" method="post"> <input type="text" name="user" size="23"> <input type="password" name="pword" size="23"> <input type="submit" value="Submit"></form> Hello </body> </html> The handler, rx/rxreport.py, is: from mod_python import apache from mod_python import psp def HandleLogin(req,user = "",pword = ""): if user == "": tmpl = psp.PSP(req,filename = "rx.psp") tmpl.run() return "NO" return "YES" Attempting to open http://localhost:8090/rx/rx.psp gives: Mod_python error: "PythonHandler mod_python.psp" Traceback (most recent call last): File "C:\Utilities\Python23\Lib\site-packages\mod_python\apache.py", line 299, in HandlerDispatch result = object(req) File "C:\Utilities\Python23\Lib\site-packages\mod_python\psp.py", line 297, in handler p.run() File "C:\Utilities\Python23\Lib\site-packages\mod_python\psp.py", line 208, in run exec code in global_scope File "C:/Program Files/Apache Group/Apache2/htdocs/rx/rx.psp", line 2, in ? import rxreport File "C:/Program Files/Apache Group/Apache2/htdocs/rx/\rxreport.py", line 2, in ? from mod_python import psp ImportError: cannot import name psp -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20040510/41104e4b/attachment.html
|