示例#1
0
def test_get_notes():
    n = notes_api.get_notes()
    notes_api.add_note("aaa")
    n = notes_api.get_notes("aaa")
    assert len(n) > 0
    assert "aaa" in n
    print(n)
def post_notes():
    user = request.form.get("user")
    note = request.form.get("note")
    if note != None and note != "":
        notes_api.add_note(str(user + ": " + note))
    response = make_response(redirect("/notes"))
    response.set_cookie("user", user)
    return(response)
示例#3
0
def post_notes():
    message="Note = '" + request.form.get("note") + "'"
    note = request.form.get("note")
    if note != None and note != "":
        notes_api.add_note(str(note))
    # my_notes = notes.get_notes()
    #return render_template("notes.html", message=message, notes=my_notes)
    return render_template("notes.html", message=message)
示例#4
0
def post_notes():
    note = request.form.get("note")
    if note != None and note != "":
        notes_api.add_note(str(note))
    return redirect("/notes")