aboutsummaryrefslogtreecommitdiffhomepage
path: root/apioforum/forum.py
diff options
context:
space:
mode:
Diffstat (limited to 'apioforum/forum.py')
-rw-r--r--apioforum/forum.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/apioforum/forum.py b/apioforum/forum.py
index 05fe231..49e0c73 100644
--- a/apioforum/forum.py
+++ b/apioforum/forum.py
@@ -267,6 +267,8 @@ def view_forum(forum,page=1):
is_read=read.is_read,
)
+from .thread import apply_selected_tags
+
@forum_route("create_thread",methods=("GET","POST"))
@requires_permission("p_create_threads")
@requires_permission("p_view_forum")
@@ -299,6 +301,8 @@ def create_thread(forum):
"INSERT INTO posts (thread,created,author,content) VALUES (?,current_timestamp,?,?);",
(thread_id,g.user,content)
)
+ thread = {'id': thread_id, 'forum': forum['id']}
+ apply_selected_tags(thread, request.form)
db.commit()
set_updated(forum['id'])
@@ -309,7 +313,9 @@ def create_thread(forum):
flash(err)
- return render_template("create_thread.html")
+ return render_template("config_thread.html",
+ forum=forum,
+ avail_tags=get_avail_tags(forum['id']))
@forum_route("roles",methods=("GET","POST"))
@requires_bureaucrat