Beispiel #1
0
def hot_status():
    statuses = db.session.query(HotStatus).order_by(HotStatus.repostsCount.desc()).limit(100)
    status_hot = []             
    for status in statuses:
        uid = status.uid
        user = get_user(uid)
        status_hot.append({'status': status, 'user': user}) 
    return render_template('propagate/hot_status.html',status_hot = status_hot)
Beispiel #2
0
def getHotStatus(limit_num=5):
    statuses = db.session.query(HotStatus).order_by(HotStatus.repostsCount.desc()).limit(limit_num)
    status_hot = []             
    for status in statuses:
        uid = status.uid
        user = get_user(uid)
        status_hot.append({'status': status, 'user': user})
    return status_hot