Exemplo n.º 1
0
def hidden():
    return cursor.query(Link).filter(Link.hidden == True).order_by(Link.date.desc()).limit(50).all()
Exemplo n.º 2
0
def index():
    return cursor.query(Link).filter(and_(Link.combined_prediction == True,or_(Link.hidden == None,Link.hidden == False))).order_by(Link.evaluation_date.desc()).limit(5).from_self().order_by(Link.evaluation_date.asc()).all() \
         + cursor.query(Link).filter(and_(Link.evaluation_date == None,Link.combined_prediction == True,or_(Link.hidden == None,Link.hidden == False))).order_by(Link.date.desc()).limit(45).all()
Exemplo n.º 3
0
def disliked():
    return cursor.query(Link).filter(and_(Link.evaluation == False,or_(Link.hidden == None,Link.hidden == False))).order_by(Link.date.asc()).limit(50).all()