| Store | Cart

mod_python, user missing

From: KasiKuula <Kasi...@luuseri.net>
Fri, 25 Mar 2005 20:14:34 +0200
apache conf
<Directory /python-publisher/>
     SetHandler mod_python
     PythonHandler mod_python.publisher
</Directory>


and this is in /python-publisher/index.py

__auth_realm__ = 'VIP'

def __auth__(req, user, passwd):
     if user == 'noppa' and passwd == 'potti':
         return True
       else:
         return False

def __access__(req, user):
     if user == 'noppa':
         return True
     else:
         return False

def index(req):
     req.get_basic_auth_pw()
     user = req.user
     return 'user is %s' % (user)


So problem is, how I get user in index function? That gives allways "None"

-- 
  (8)

Recent Messages in this Thread
KasiKuula Mar 25, 2005 06:14 pm
grah...@dscpl.com.au Mar 25, 2005 10:18 pm
KasiKuula Mar 26, 2005 08:04 am
grah...@dscpl.com.au Mar 25, 2005 10:52 pm
Messages in this thread