Ejemplo n.º 1
0
def index():
    repos = [(key, json.loads(value))
             for key, value in REDIS.hgetall('repos').items()]
    # repos.sort(key=lambda x:x.star)
    # print repos
    # repos.sort(key=lambda x: x['star'], reverse=True)
    # print repos
    repos.sort(key=lambda x: x[1]['star'], reverse=True)
    return render_template('index.html',
                           repos=repos,
                           keywords=REDIS.get('keywords').decode('utf-8'))
Ejemplo n.º 2
0
def index():
    repos = [(key, json.loads(value)) for key, value in REDIS.hgetall('repos').items()]
    return render_template('index.html', repos=repos, keywords=REDIS.get('keywords').decode('utf-8'))
Ejemplo n.º 3
0
def index():
    todolist = [(id.decode('utf8'), json.loads(value))
                 for id, value in REDIS.hgetall('todolist').items()]
    return render_template('index.html', todolist=todolist)