check posts
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not 2023-07-13 19:50:45 +10:00
parent a57a964c60
commit 6094f277b5
4 changed files with 33 additions and 2 deletions

10
app.py
View File

@ -56,6 +56,16 @@ def page_board(board_id):
return render_template("board.html", board_id=board_id, boards=board_list, board_threads=b_threads)
@app.route("/db_posts")
def page_posts_from_db():
posts = db.collection('posts')
postos = [ p for p in postos]
return render_template("interactive-posts.html", postos=postos)
# @app.route('/post_my_post', method=['POST'])
# def post_a_post():
# pass

7
templates/i-posts.html Normal file
View File

@ -0,0 +1,7 @@
{% if posts | length > 0 %}
{% for post in posts %}
<div class="posto">
{{ post.texto }}
</div>
{% endfor %}
{% endif %}

View File

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block content %}
<nav>
<a href="/">glavnaya</a>
<br>
</nav>
{% include 'i-posts.html' %}
{% endblock content %}

View File

@ -9,9 +9,9 @@
</div>
<nav>
<a routerLink = "/">Напоминание </a>
<a href="/">glavnaya</a>
<br>
<a routerLink = "/about">О нас </a>
<a href="/db_posts">here we go</a>
<br>
Доски:
<div class="boards">