Ejemplo n.º 1
0
def ajax_basic_info():
    uid = request.args.get("uid", "")
    uid = str(uid)

    # test
    uid = "1713926427"

    results = es_get_source(uid)

    return json.dumps(results)
Ejemplo n.º 2
0
def ajax_basic_info():
    uid = request.args.get('uid', '')
    uid = str(uid)

    # test
    uid = '1713926427'

    results = es_get_source(uid)

    return json.dumps(results)
Ejemplo n.º 3
0
def ajax_basic_info():
    uid = request.args.get('uid', '')
    uid = str(uid)

    # test 
    uid = '1713926427'


    results = es_get_source(uid)

    return json.dumps(results)
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
    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)