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)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to