From 5fd96e6fc69a1ab488630cf4e693efcb7683c4b8 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sun, 6 Jun 2021 16:58:23 +0000 Subject: edit post slightly --- apioforum/templates/edit_post.html | 13 +++++++++++++ apioforum/thread.py | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 apioforum/templates/edit_post.html 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 %} +

{%block title%}editing post{%endblock%}

+{% endblock %} + +{% block content %} +
+ + +
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("//edit_post/",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") -- cgit v1.2.3