[mod_python] calla function from form and via link

sandor.kopanyi at mailbox.hu sandor.kopanyi at mailbox.hu
Wed Jan 22 08:59:21 EST 2003


Hi Mike,

> http://.../function?id=blah
> 
> should give you the request object, and same with

Yes, it does. I had a typo in my code (param name).
Thanks for the hint.

> I'm not sure how the database password got into the req in the first
> place. Is 
> it supplied by the user at some point, or is it the same for every
user?

I extract the password from req, as explained in section 3.3 of
mod_python
2.7 docs
(http://www.modpython.org/live/mod_python-2.7.8/doc-html/tut-more-complicated.html):

pw = req.get_basic_auth_pw()
user = req.connection.user

If I return an apache.UNAUTHORIZED the browser will ask for username/pw.

/Sandor

________________________________________________
http://mailbox.hu - Már SMS értesítéssel is!





More information about the Mod_python mailing list