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)
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)
def post_notes(): note = request.form.get("note") if note != None and note != "": notes_api.add_note(str(note)) return redirect("/notes")