def __init__(self, username=None, password=None, *args, **kw): Client.__init__(self, *args, **kw) self._authorization = {} if username and password: auth = base64.b64encode('%s:%s' % (username, password)) self._authorization = { 'HTTP_AUTHORIZATION': 'Basic %s' % (auth,) }
def __init__(self, **kargs): self.prefix=settings.UNIT_URL[:-1] DClient.__init__(self, **kargs)
def __init__(self, username=None, password=None, *args, **kw): Client.__init__(self, *args, **kw) self._authorization = {} if username and password: auth = base64.b64encode('%s:%s' % (username, password)) self._authorization = {'HTTP_AUTHORIZATION': 'Basic %s' % (auth, )}
def __init__(self, **kargs): self.prefix = settings.UNIT_URL[:-1] DClient.__init__(self, **kargs)