This commit is contained in:
parent
622fa4f50d
commit
ed2cf28893
15
app.py
15
app.py
@ -49,22 +49,19 @@ def homepage():
|
||||
return render_template("main-page.html", host_id=docker_short_id, boards=board_list)
|
||||
|
||||
|
||||
@app.route("/boards/<board_id>")
|
||||
def page_board(board_id):
|
||||
|
||||
b_threads = [ open_threads[thread_id] for thread_id in open_threads if thread_id in threads_lists[board_id]]
|
||||
return render_template("board.html", host_id=docker_short_id, board_id=board_id, boards=board_list, board_threads=b_threads)
|
||||
|
||||
|
||||
|
||||
@app.route("/db_posts")
|
||||
def page_posts_from_db():
|
||||
@app.route("/db_posts/<target_post_id>")
|
||||
def page_posts_from_db(target_post_id=None):
|
||||
|
||||
postos = db.collection('posts')
|
||||
postos = [ p for p in postos]
|
||||
postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False)
|
||||
|
||||
return render_template("interactive-posts.html", host_id=docker_short_id, postos=postos)
|
||||
if not target_post_id:
|
||||
target_post_id = postos[0]._key
|
||||
|
||||
return render_template("interactive-posts.html", host_id=docker_short_id, postos=postos, target_post_id=target_post_id)
|
||||
|
||||
|
||||
@app.route('/post_my_post/<post_key>', methods=['POST'])
|
||||
|
@ -11,7 +11,7 @@
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
<span class="card-title">Создай то, о чем будут говорить многие.</span>
|
||||
<a class="btn-floating halfway-fab waves-effect waves-light red" target="#post-{{ postos[0]._key }}"><i class="material-icons">>></i></a>
|
||||
<a class="btn-floating halfway-fab waves-effect waves-light red" target="#post-{{ target_post_id }}"><i class="material-icons">>></i></a>
|
||||
<div class="input-field col s6">
|
||||
<input id="send_this_text" type="text" >
|
||||
<label for="send_this_text">Печатать сюда</label>
|
||||
|
Loading…
Reference in New Issue
Block a user