[mod_python] req.connection.user generates AttributeError

Hancock, David (DHANCOCK) DHANCOCK at arinc.com
Sun Oct 19 17:20:36 EST 2003


Grisha: Thanks for getting back to me on this. I found req.connection.user
in the PDF manual dated 4/19/2002, Section 3.3, page 12.  And now that I
look at the title page, it's for 2.7.8, NOT for 3.0.3.  I downloaded the
manual to match my installation, and it shows req.user in that section.

My apologies for not having RTFMed better--I read, just the wrong one.

Cheers!
--
David Hancock | dhancock at arinc.com | 410-266-4384


-----Original Message-----
From: Gregory (Grisha) Trubetskoy [mailto:grisha at modpython.org] 
Sent: Sunday, October 19, 2003 2:21 PM
To: Hancock, David (DHANCOCK)
Cc: 'mod_python at modpython.org'
Subject: Re: [mod_python] req.connection.user generates AttributeError



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?

Thanks,

Grisha

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