Beispiel #1
0
 def __init__(self, columns):
     for key, value in map2x(None, self.COLUMNS, columns):
         if key:
             setattr(self, key, value)
     # special handling for 'args' - parse it into a dict if it is a string
     if isinstance(self.args, string_types):
         self.args = dict(x for x in parse_qsl(self.args.encode('utf-8')))
Beispiel #2
0
 def __init__(self, columns, catalog_obj):
     self.session = catalog_obj.session
     self.request_kwargs = catalog_obj.request_kwargs
     for key, value in map2x(None, self.COLUMNS, columns):
         if key:
             setattr(self, key, value)
     # special handling for 'args' - parse it into a dict if it is a string
     if isinstance(self.args, string_types):
         self.args = dict(x for x in parse_qsl(self.args.encode('utf-8')))