Exemplo n.º 1
0
def cah_topic(topic):
    topic = topic.lower()
    for i in xrange(1000):
        statement = cah.fill_statement()  
        if topic in statement.lower():
            break
    else:
        statement = "Nothing wise found about %s. Have some random wisdom instead: %s"%(
            topic, cah.fill_statement())
    return jsonify({"wisdom": statement})
Exemplo n.º 2
0
def cah_filled():
    return render_template("message.html", message=cah.fill_statement())
Exemplo n.º 3
0
def cah_json():
    return jsonify({"wisdom":cah.fill_statement()})