I enable basic auth with auth.settings.allow_basic_login = True I tried wget [email protected] --password=xxx http: //127.0.0.1:8000/pyMantis/tlc/records.json/Strain curl --head -u [email protected]:xxx http: //127.0.0.1:8000/pyMantis/tlc/records.json/Strain
and the python code import urllib2 import base64 url = 'http://127.0.0.1:8000/pyMantis/tlc/records.json/Strain' username, password = '[email protected]:xxx'.split(':') request = urllib2.Request(url) base64string = base64.encodestring('%s:%s' % (username, password)).replace( '\n', '') request.add_header("Authorization", "Basic %s" % base64string) fp = urllib2.urlopen(request) ... But nothing seems to work? Am I missing something?

