DmitrMakeev
commited on
Commit
•
8058636
1
Parent(s):
c803751
Update app.py
Browse files
app.py
CHANGED
@@ -69,54 +69,55 @@ if not os.path.exists(UPLOAD_FOLDER):
|
|
69 |
|
70 |
DATABASES = ['data_gc.db', 'data1.db', 'data2.db', 'data3.db', 'data4.db', 'data5.db']
|
71 |
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
cursor = conn.cursor()
|
75 |
cursor.execute('''
|
76 |
CREATE TABLE IF NOT EXISTS contacts (
|
77 |
-
id INTEGER PRIMARY KEY
|
78 |
-
name TEXT
|
79 |
-
phone TEXT
|
80 |
-
email TEXT
|
81 |
-
vk_id TEXT,
|
82 |
-
chat_id TEXT,
|
83 |
-
ws_st TEXT,
|
84 |
-
ws_stop TEXT,
|
85 |
-
web_st
|
86 |
-
fin_prog
|
87 |
-
b_city TEXT,
|
88 |
-
b_fin TEXT,
|
89 |
-
b_ban TEXT,
|
90 |
-
b_ign TEXT,
|
91 |
-
b_baners TEXT,
|
92 |
-
b_butt TEXT,
|
93 |
-
b_mess TEXT,
|
94 |
-
shop_st TEXT,
|
95 |
-
curator TEXT,
|
96 |
-
pr1 TEXT,
|
97 |
-
pr2 TEXT,
|
98 |
-
pr3 TEXT,
|
99 |
-
pr4 TEXT,
|
100 |
-
pr5 TEXT,
|
101 |
-
gc_url TEXT,
|
102 |
-
key_pr TEXT,
|
103 |
-
n_con TEXT,
|
104 |
-
canal TEXT,
|
105 |
-
data_on TEXT,
|
106 |
-
data_t TEXT,
|
107 |
-
utm_source TEXT,
|
108 |
-
utm_medium TEXT,
|
109 |
-
utm_campaign TEXT,
|
110 |
-
utm_term TEXT,
|
111 |
-
utm_content TEXT,
|
112 |
-
gcpc TEXT
|
113 |
)
|
114 |
''')
|
115 |
conn.commit()
|
116 |
conn.close()
|
117 |
|
118 |
-
|
119 |
-
init_db(db)
|
120 |
|
121 |
|
122 |
template = {
|
|
|
69 |
|
70 |
DATABASES = ['data_gc.db', 'data1.db', 'data2.db', 'data3.db', 'data4.db', 'data5.db']
|
71 |
|
72 |
+
|
73 |
+
|
74 |
+
def create_table():
|
75 |
+
conn = sqlite3.connect(DATABASE6)
|
76 |
cursor = conn.cursor()
|
77 |
cursor.execute('''
|
78 |
CREATE TABLE IF NOT EXISTS contacts (
|
79 |
+
id INTEGER PRIMARY KEY,
|
80 |
+
name TEXT DEFAULT '',
|
81 |
+
phone TEXT DEFAULT '',
|
82 |
+
email TEXT DEFAULT '',
|
83 |
+
vk_id TEXT DEFAULT '',
|
84 |
+
chat_id TEXT DEFAULT '',
|
85 |
+
ws_st TEXT DEFAULT '',
|
86 |
+
ws_stop TEXT DEFAULT '',
|
87 |
+
web_st TEXT DEFAULT '',
|
88 |
+
fin_prog TEXT DEFAULT '',
|
89 |
+
b_city TEXT DEFAULT '',
|
90 |
+
b_fin TEXT DEFAULT '',
|
91 |
+
b_ban TEXT DEFAULT '',
|
92 |
+
b_ign TEXT DEFAULT '',
|
93 |
+
b_baners TEXT DEFAULT '',
|
94 |
+
b_butt TEXT DEFAULT '',
|
95 |
+
b_mess TEXT DEFAULT '',
|
96 |
+
shop_st TEXT DEFAULT '',
|
97 |
+
curator TEXT DEFAULT '',
|
98 |
+
pr1 TEXT DEFAULT '',
|
99 |
+
pr2 TEXT DEFAULT '',
|
100 |
+
pr3 TEXT DEFAULT '',
|
101 |
+
pr4 TEXT DEFAULT '',
|
102 |
+
pr5 TEXT DEFAULT '',
|
103 |
+
gc_url TEXT DEFAULT '',
|
104 |
+
key_pr TEXT DEFAULT '',
|
105 |
+
n_con TEXT DEFAULT '',
|
106 |
+
canal TEXT DEFAULT '',
|
107 |
+
data_on TEXT DEFAULT '',
|
108 |
+
data_t TEXT DEFAULT '',
|
109 |
+
utm_source TEXT DEFAULT '',
|
110 |
+
utm_medium TEXT DEFAULT '',
|
111 |
+
utm_campaign TEXT DEFAULT '',
|
112 |
+
utm_term TEXT DEFAULT '',
|
113 |
+
utm_content TEXT DEFAULT '',
|
114 |
+
gcpc TEXT DEFAULT ''
|
115 |
)
|
116 |
''')
|
117 |
conn.commit()
|
118 |
conn.close()
|
119 |
|
120 |
+
create_table()
|
|
|
121 |
|
122 |
|
123 |
template = {
|