Exemple #1
0
 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,)
             }
Exemple #2
0
 def __init__(self, **kargs):
         self.prefix=settings.UNIT_URL[:-1]
         DClient.__init__(self, **kargs)
Exemple #3
0
 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, )}
Exemple #4
0
 def __init__(self, **kargs):
     self.prefix = settings.UNIT_URL[:-1]
     DClient.__init__(self, **kargs)