This commit is contained in:
21
app.py
21
app.py
@@ -109,28 +109,7 @@ def post_a_post(post_key):
|
||||
# def post_a_file():
|
||||
# pass
|
||||
|
||||
|
||||
### stolen
|
||||
@app.route("/todo")
|
||||
def page_todo():
|
||||
return render_template("page1.html")
|
||||
|
||||
|
||||
@app.route("/search", methods=["POST"])
|
||||
def search_todo():
|
||||
search_term = request.form.get("search")
|
||||
|
||||
if not len(search_term):
|
||||
return render_template("todo.html", host_id=docker_short_id, todos=[])
|
||||
|
||||
res_todos = []
|
||||
for todo in todos:
|
||||
if search_term in todo["title"]:
|
||||
res_todos.append(todo)
|
||||
|
||||
return render_template("todo.html", host_id=docker_short_id, todos=res_todos)
|
||||
### /stolen
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user