From fc295ac93d0ad6b0272aa94f2d2ea44002ecbc48 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 21 Jul 2019 21:48:54 -0700 Subject: Convert comment posting system to flask framework --- youtube/comments.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'youtube/comments.py') diff --git a/youtube/comments.py b/youtube/comments.py index 768bc13..ba82154 100644 --- a/youtube/comments.py +++ b/youtube/comments.py @@ -258,11 +258,16 @@ def get_comments_page(): comments_info['comment_links'] = [(other_sort_text, other_sort_url)] + comment_posting_box_info = { + 'form_action': '' if replies else util.URL_ORIGIN + '/post_comment', + 'video_id': comments_info['video_id'], + 'accounts': accounts.account_list_data(), + 'include_video_id_input': not replies, + 'replying': replies, + } + return flask.render_template('comments_page.html', comments_info = comments_info, - - form_action = '' if replies else util.URL_ORIGIN + '/post_comment', - include_video_id_input = not replies, - accounts = accounts.account_list_data(), + comment_posting_box_info = comment_posting_box_info, ) -- cgit v1.2.3