From 4f4bcdf31d4412590a5bea940fd1b94ae22f47f5 Mon Sep 17 00:00:00 2001 From: duongban Date: Tue, 25 May 2021 22:43:18 +0700 Subject: [PATCH] Use suitable name route --- flash_cards.py | 6 +++--- templates/editTag.html | 2 +- templates/tags.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flash_cards.py b/flash_cards.py index 4117aa0..8547334 100644 --- a/flash_cards.py +++ b/flash_cards.py @@ -302,7 +302,7 @@ def add_tag(): return redirect(url_for('tags')) @app.route('/editTag/') -def editTag(tag_id): +def edit_tag(tag_id): if not session.get('logged_in'): return redirect(url_for('login')) db = get_db() @@ -315,8 +315,8 @@ def editTag(tag_id): tag = cur.fetchone() return render_template('editTag.html', tag=tag) -@app.route('/edit_tag', methods=['POST']) -def edit_tag(): +@app.route('/updateTag', methods=['POST']) +def update_tag(): if not session.get('logged_in'): return redirect(url_for('login')) db = get_db() diff --git a/templates/editTag.html b/templates/editTag.html index 90c2402..08c87e6 100644 --- a/templates/editTag.html +++ b/templates/editTag.html @@ -2,7 +2,7 @@ {% block body %}

Edit Tag #{{ tag.id }}

-
+
diff --git a/templates/tags.html b/templates/tags.html index 1e8f97c..ce619c4 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -24,7 +24,7 @@ {% for tag in tags %} - +