def _construct_ops(self, url, params):
     return '{}?{}'.format(
         url,
         urlencode(
             {k: unicode(v).encode('utf-8')
              for k, v in iteritems(params)}))
示例#2
0
 def prepare_city(self, city):
     if city is not None:
         self.city = unicode(city)
示例#3
0
 def __str__(self):
     return unicode(getattr(self, 'url'))
示例#4
0
 def prepare_keyword(self, keyword):
     if keyword is not None:
         self.keyword = unicode(keyword)