summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-06-14 19:14:04 +0000
committerubq323 <ubq323>2021-06-14 19:14:04 +0000
commit9960239de2011dc286190a851a3dc035963b109a (patch)
treeed502eb4af6bc206368ae7fe5a15ba6d1ca50022
parent12bcd3de36d12705ec6a4177ab50889ee099442b (diff)
add first parts of config thread page
-rw-r--r--apioforum/templates/view_thread.html1
-rw-r--r--apioforum/thread.py8
2 files changed, 9 insertions, 0 deletions
diff --git a/apioforum/templates/view_thread.html b/apioforum/templates/view_thread.html
index f38cf34..ddc45b8 100644
--- a/apioforum/templates/view_thread.html
+++ b/apioforum/templates/view_thread.html
@@ -5,6 +5,7 @@
{% endblock %}
{%block content%}
+<a class="actionbutton" href="{{url_for('thread.config_thread',thread_id=thread_id)}}">configure</a>
<div class="posts">
{% for post in posts %}
{% call disp_post(post, True) %}
diff --git a/apioforum/thread.py b/apioforum/thread.py
index 630cb33..f520d8e 100644
--- a/apioforum/thread.py
+++ b/apioforum/thread.py
@@ -105,4 +105,12 @@ def edit_post(post_id):
flash(err)
return render_template("edit_post.html",post=post)
+@bp.route("/<int:thread_id>/config",methods=["GET","POST"])
+def config_thread(thread_id):
+ db = get_db()
+ thread = db.execute("select * from threads where id = ?",(thread_id,)).fetchone()
+ if request.method == "POST":
+ abort(418)
+ return render_template("config_thread.html", thread=thread)
+