From 25725646cbafbf67b7f33e7caf01ba8396cd617c Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Fri, 14 Jul 2023 12:34:27 +1000 Subject: [PATCH] check posts --- app.py | 1 + templates/i-posts.html | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app.py b/app.py index 31fdb9a..9c52128 100644 --- a/app.py +++ b/app.py @@ -77,6 +77,7 @@ def post_a_post(post_key): #### TODO проверить как-то по-умному что мы таки его добавили metadata = postos.insert({ 'texto': 'next post is this', + 'parent_post': f'{post_key}' }, overwrite_mode='update') metadata = db.collection('post_parents').insert({ diff --git a/templates/i-posts.html b/templates/i-posts.html index 51e0394..29e2c1e 100644 --- a/templates/i-posts.html +++ b/templates/i-posts.html @@ -20,6 +20,9 @@
#{{ posto._key }} + {% if posto.parent_post %} + >{{ posto.parent_post }} + {% endif %} Ответов: {{ posto.answers_num }} Длина треда: {{ posto.children_num }}