This commit is contained in:
parent
a57a964c60
commit
6094f277b5
10
app.py
10
app.py
@ -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
7
templates/i-posts.html
Normal file
@ -0,0 +1,7 @@
|
||||
{% if posts | length > 0 %}
|
||||
{% for post in posts %}
|
||||
<div class="posto">
|
||||
{{ post.texto }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
14
templates/interactive-posts.html
Normal file
14
templates/interactive-posts.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<nav>
|
||||
<a href="/">glavnaya</a>
|
||||
<br>
|
||||
</nav>
|
||||
|
||||
|
||||
{% include 'i-posts.html' %}
|
||||
|
||||
{% endblock content %}
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user