From 66cc98ecfc4b7d0031a3a5809cb0d1be4890a212 Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Wed, 12 Jul 2023 01:50:29 +1000 Subject: [PATCH] annother hexxo --- app.py | 13 +++++++------ reqs.txt | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index 734f804..a077d06 100644 --- a/app.py +++ b/app.py @@ -1,10 +1,10 @@ from flask import Flask, render_template, request from flask_assets import Bundle, Environment from todo import todos -from boards import board_list +#from boards import board_list from threads import threads_lists from threads_with_posts import open_threads -#from arango import ArangoClient +from arango import ArangoClient import socket @@ -24,11 +24,12 @@ js.build() -# arango_client = ArangoClient(hosts='http://localhost:8529') -# db = arango_client.db('board1', username='root', password='rootpassword') +arango_client = ArangoClient(hosts='http://localhost:8529') +db = arango_client.db('board1', username='root', password='rootpassword') -# boards = db.collection('boards') - +# предполагается что меняться список будет весьма редко, поэтому подхватываем при лишь при перезапуске +boards0 = db.collection('boards') +board_list = [ k['_key'] for k in boards0] @app.route('/liveness') diff --git a/reqs.txt b/reqs.txt index dfeeb43..9156824 100644 --- a/reqs.txt +++ b/reqs.txt @@ -1,2 +1,3 @@ flask -flask-assets \ No newline at end of file +flask-assets +python-arango \ No newline at end of file