def ajax_basic_info(): uid = request.args.get("uid", "") uid = str(uid) # test uid = "1713926427" results = es_get_source(uid) return json.dumps(results)
def ajax_basic_info(): uid = request.args.get('uid', '') uid = str(uid) # test uid = '1713926427' results = es_get_source(uid) return json.dumps(results)
def get(self, id): user = es_get_source(id) followers = [] friends = [] if user: user_followers_ids = user.get('followers') user_friends_ids = user.get('friends') if user_followers_ids: followers = es_mget_source(user_followers_ids) if user_friends_ids: friends = es_mget_source(user_friends_ids) return render_template(self.template, user=user, followers=followers, friends=friends, id=id)