DmitrMakeev commited on
Commit
6fa93e6
·
verified ·
1 Parent(s): f720c56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -33
app.py CHANGED
@@ -664,7 +664,7 @@ def data_gc_tab_out():
664
  cursor.execute('''
665
  SELECT id, name, phone, email, vk_id, chat_id, ws_st, ws_stop, web_st, fin_prog,
666
  b_city, b_fin, b_ban, b_ign, b_baners, b_butt, b_mess, shop_st, curator,
667
- pr1, pr2, pr3, pr4, pr5, gc_url, key_pr, n_con, canal, data_t, utm_source, utm_medium, utm_campaign, utm_term, utm_content
668
  FROM contacts
669
  ''')
670
  contacts = cursor.fetchall()
@@ -677,9 +677,9 @@ def data_gc_tab_out():
677
  'b_ban': contact[12], 'b_ign': contact[13], 'b_baners': contact[14], 'b_butt': contact[15],
678
  'b_mess': contact[16], 'shop_st': contact[17], 'curator': contact[18], 'pr1': contact[19],
679
  'pr2': contact[20], 'pr3': contact[21], 'pr4': contact[22], 'pr5': contact[23],
680
- 'gc_url': contact[24], 'key_pr': contact[25], 'n_con': contact[26], 'canal': contact[27],
681
- 'data_t': contact[28],'utm_source': contact[29], 'utm_medium': contact[30], 'utm_campaign': contact[31],
682
- 'utm_term': contact[32], 'utm_content': contact[33]
683
  } for contact in contacts]
684
  return jsonify(contacts_json), 200
685
  except Exception as e:
@@ -1185,7 +1185,7 @@ def bas_pages_gen():
1185
 
1186
 
1187
 
1188
-
1189
  @app.route('/total_users', methods=['GET'])
1190
  def total_users():
1191
  try:
@@ -1217,13 +1217,7 @@ def total_users():
1217
  print(f"Error getting total users: {e}")
1218
  return "Internal Server Error", 500
1219
 
1220
-
1221
-
1222
-
1223
-
1224
-
1225
-
1226
-
1227
  @app.route('/all_users_gc', methods=['GET'])
1228
  def all_users_gc():
1229
  try:
@@ -1243,8 +1237,7 @@ def all_users_gc():
1243
  print(f"Error getting all users from data_gc: {e}")
1244
  return "Internal Server Error", 500
1245
 
1246
-
1247
-
1248
  @app.route('/all_users_ras', methods=['GET'])
1249
  def all_users_ras():
1250
  try:
@@ -1267,8 +1260,12 @@ def all_users_ras():
1267
 
1268
 
1269
 
1270
-
1271
 
 
 
 
 
 
1272
  @app.route('/gc_db_no_email', methods=['GET'])
1273
  def gc_db_no_email():
1274
  try:
@@ -1342,10 +1339,6 @@ def gc_db_no_email():
1342
  print(f"Error in gc_db_no_email: {e}")
1343
  return "Internal Server Error", 500
1344
 
1345
-
1346
-
1347
-
1348
-
1349
  @app.route('/gc_db_email', methods=['GET'])
1350
  def gc_db_email():
1351
  try:
@@ -1411,19 +1404,7 @@ def gc_db_email():
1411
  except Exception as e:
1412
  print(f"Error in gc_db_email: {e}")
1413
  return "Internal Server Error", 500
1414
-
1415
-
1416
-
1417
-
1418
-
1419
-
1420
-
1421
-
1422
-
1423
-
1424
-
1425
-
1426
-
1427
  @app.route('/gc_forms', methods=['GET'])
1428
  def gc_forms():
1429
  try:
@@ -1511,6 +1492,10 @@ def gc_forms():
1511
 
1512
 
1513
 
 
 
 
 
1514
  curators = ["Anna", "Ekaterina", "Ivan", "Maria", "Sergey", "Olga", "Alex", "Natalia", "Dmitry", "Elena"]
1515
 
1516
 
@@ -1663,7 +1648,7 @@ def add_data_ver_cur():
1663
 
1664
 
1665
 
1666
-
1667
 
1668
  DATABASE2 = 'data_gc.db'
1669
 
 
664
  cursor.execute('''
665
  SELECT id, name, phone, email, vk_id, chat_id, ws_st, ws_stop, web_st, fin_prog,
666
  b_city, b_fin, b_ban, b_ign, b_baners, b_butt, b_mess, shop_st, curator,
667
+ pr1, pr2, pr3, pr4, pr5, gc_url, key_pr, n_con, canal, data_on, data_t, utm_source, utm_medium, utm_campaign, utm_term, utm_content, gcpc
668
  FROM contacts
669
  ''')
670
  contacts = cursor.fetchall()
 
677
  'b_ban': contact[12], 'b_ign': contact[13], 'b_baners': contact[14], 'b_butt': contact[15],
678
  'b_mess': contact[16], 'shop_st': contact[17], 'curator': contact[18], 'pr1': contact[19],
679
  'pr2': contact[20], 'pr3': contact[21], 'pr4': contact[22], 'pr5': contact[23],
680
+ 'gc_url': contact[24], 'key_pr': contact[25], 'n_con': contact[26], 'canal': contact[27],'data_on': contact[28],
681
+ 'data_t': contact[29],'utm_source': contact[30], 'utm_medium': contact[31], 'utm_campaign': contact[32],
682
+ 'utm_term': contact[33], 'utm_content': contact[34], 'gcpc': contact[34]
683
  } for contact in contacts]
684
  return jsonify(contacts_json), 200
685
  except Exception as e:
 
1185
 
1186
 
1187
 
1188
+ # Глобальная переменная для управления верификацией
1189
  @app.route('/total_users', methods=['GET'])
1190
  def total_users():
1191
  try:
 
1217
  print(f"Error getting total users: {e}")
1218
  return "Internal Server Error", 500
1219
 
1220
+ # Глобальная переменная для управления верификацией
 
 
 
 
 
 
1221
  @app.route('/all_users_gc', methods=['GET'])
1222
  def all_users_gc():
1223
  try:
 
1237
  print(f"Error getting all users from data_gc: {e}")
1238
  return "Internal Server Error", 500
1239
 
1240
+ # Глобальная переменная для управления верификацией
 
1241
  @app.route('/all_users_ras', methods=['GET'])
1242
  def all_users_ras():
1243
  try:
 
1260
 
1261
 
1262
 
 
1263
 
1264
+
1265
+
1266
+
1267
+
1268
+ # Глобальная переменная для управления верификацией
1269
  @app.route('/gc_db_no_email', methods=['GET'])
1270
  def gc_db_no_email():
1271
  try:
 
1339
  print(f"Error in gc_db_no_email: {e}")
1340
  return "Internal Server Error", 500
1341
 
 
 
 
 
1342
  @app.route('/gc_db_email', methods=['GET'])
1343
  def gc_db_email():
1344
  try:
 
1404
  except Exception as e:
1405
  print(f"Error in gc_db_email: {e}")
1406
  return "Internal Server Error", 500
1407
+ # Глобальная переменная для управления верификацией
 
 
 
 
 
 
 
 
 
 
 
 
1408
  @app.route('/gc_forms', methods=['GET'])
1409
  def gc_forms():
1410
  try:
 
1492
 
1493
 
1494
 
1495
+
1496
+
1497
+
1498
+ # Глобальная переменная для управления верификацией
1499
  curators = ["Anna", "Ekaterina", "Ivan", "Maria", "Sergey", "Olga", "Alex", "Natalia", "Dmitry", "Elena"]
1500
 
1501
 
 
1648
 
1649
 
1650
 
1651
+ # Глобальная переменная для управления верификацией
1652
 
1653
  DATABASE2 = 'data_gc.db'
1654