Beispiel #1
0
def rate():
    legs = db.legislators.find()
    offset = random.randint(0, legs.count())
    leg = legs[offset]
    return render_template("rate.html", **{
        "legislator": leg,
        "photo": create_photo_url(leg['_id']),
        "words": WORDS,
    })
Beispiel #2
0
def photo_url(leg):
    return create_photo_url(leg['_id'])