[mod_python] req.connection.user generates AttributeError

Gregory (Grisha) Trubetskoy grisha at modpython.org
Sun Oct 19 14:20:33 EST 2003

it's req.user

Just curious - where in the manual do you see this? If you're looking at
the online version, can you send me the exact url?



On Sun, 19 Oct 2003, Hancock, David (DHANCOCK) wrote:

> I'm new to mod_python, and I'm stuck already.  I'm working through the
> examples in the documentation, and even after careful typing (and cutting
> and pasting from the manual), I can't get the authentication example to
> work.  The line:
> 	user = req.connection.user
> Gives an attribute error ('user').  As shown in the manual, I'm calling
> req.get_basic_auth_pw() first, but still no joy.
> If I try/except to trap the attribute error, I avoid the 500 Server Error
> message, but the authentication still doesn't work.
> Any ideas?  I'm running Windows 2000, Apache 2.0.47, Python 2.2, and
> mod_python 3.0.3.  (My other computer is a Linux box, but this is what I've
> got right going right now).  The mod_python is a precompiled binary.
> I'll be grateful for any assistance I can get.  I'm trying to recreate a
> mod_perl module (AuthCookie) which implements a ticket-based authentication
> mechanism.  It works well in Perl, but my group standardized on Python and
> we'd like to keep using Python for Apache modules, too.
> Cheers!
> --
> David Hancock | dhancock at arinc.com | 410-266-4384

More information about the Mod_python mailing list