Spaces:
Sleeping
Sleeping
DmitrMakeev
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -37,6 +37,41 @@ if not os.path.exists(HTML_FOLDER):
|
|
37 |
|
38 |
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
@app.route('/get_current_time', methods=['GET'])
|
41 |
def get_current_time():
|
42 |
utc_now = datetime.utcnow()
|
|
|
37 |
|
38 |
|
39 |
|
40 |
+
DATABASES = ['data_gc.db', 'data1.db', 'data2.db', 'data3.db', 'data4.db', 'data5.db']
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
def init_db(db_name):
|
45 |
+
conn = sqlite3.connect(db_name)
|
46 |
+
cursor = conn.cursor()
|
47 |
+
cursor.execute('''
|
48 |
+
CREATE TABLE IF NOT EXISTS contacts (
|
49 |
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
50 |
+
name TEXT NOT NULL,
|
51 |
+
phone TEXT NOT NULL,
|
52 |
+
email TEXT NOT NULL,
|
53 |
+
vk_id TEXT,
|
54 |
+
chat_id TEXT,
|
55 |
+
ws_st TEXT,
|
56 |
+
ws_stop TEXT,
|
57 |
+
web_st INTEGER,
|
58 |
+
fin_prog INTEGER,
|
59 |
+
gcpc TEXT
|
60 |
+
)
|
61 |
+
''')
|
62 |
+
conn.commit()
|
63 |
+
conn.close()
|
64 |
+
|
65 |
+
for db in DATABASES:
|
66 |
+
init_db(db)
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
@app.route('/get_current_time', methods=['GET'])
|
76 |
def get_current_time():
|
77 |
utc_now = datetime.utcnow()
|