summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-06-06 16:58:23 +0000
committerubq323 <ubq323>2021-06-06 16:58:23 +0000
commit5fd96e6fc69a1ab488630cf4e693efcb7683c4b8 (patch)
treef2e3f3023478b491456d73cedddda64f3ff0314f
parente2b8fc0582776a366def582d73b686c8968b44c3 (diff)
edit post slightly
-rw-r--r--apioforum/templates/edit_post.html13
-rw-r--r--apioforum/thread.py3
2 files changed, 15 insertions, 1 deletions
diff --git a/apioforum/templates/edit_post.html b/apioforum/templates/edit_post.html
new file mode 100644
index 0000000..00673b8
--- /dev/null
+++ b/apioforum/templates/edit_post.html
@@ -0,0 +1,13 @@
+{% from 'common.html' import disp_post %}
+{% extends 'base.html' %}
+{% block header %}
+<h1>{%block title%}editing post{%endblock%}</h1>
+{% endblock %}
+
+{% block content %}
+<form method="post">
+<textarea name="newcontent">
+ the
+</textarea>
+<input type="submit" value="go">
+</form>
diff --git a/apioforum/thread.py b/apioforum/thread.py
index f22ca85..61066a1 100644
--- a/apioforum/thread.py
+++ b/apioforum/thread.py
@@ -56,4 +56,5 @@ def delete_post(thread_id, post_id):
@bp.route("/<int:thread_id>/edit_post/<int:post_id>",methods=["GET","POST"])
def edit_post(thread_id, post_id):
- return f"todo (t: {thread_id}, p: {post_id})"
+ if request.method == "GET":
+ return render_templace("edit_post.html")