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})
def cah_filled(): return render_template("message.html", message=cah.fill_statement())
def cah_json(): return jsonify({"wisdom":cah.fill_statement()})