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