This commit is contained in:
16
app.py
16
app.py
@@ -63,6 +63,22 @@ def page_posts_from_db(target_post_id=None):
|
||||
|
||||
return render_template("interactive-posts.html", host_id=docker_short_id, postos=postos, target_post_id=target_post_id)
|
||||
|
||||
|
||||
@app.route("/answer_post/<target_post_id>")
|
||||
def page_posts_from_db(target_post_id):
|
||||
|
||||
postos = db.collection('posts')
|
||||
postos = [ p for p in postos]
|
||||
postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False)
|
||||
|
||||
if not target_post_id:
|
||||
target_post_id = postos[0]['_key']
|
||||
|
||||
return render_template("answer-post.html", target_post_id=target_post_id)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.route('/post_my_post/<post_key>', methods=['POST'])
|
||||
def post_a_post(post_key):
|
||||
|
||||
Reference in New Issue
Block a user