Update app.py
Browse files
app.py
CHANGED
|
@@ -1749,8 +1749,13 @@ def insert_data2(data, template_key):
|
|
| 1749 |
VALUES ({placeholders})
|
| 1750 |
'''
|
| 1751 |
|
|
|
|
|
|
|
|
|
|
| 1752 |
try:
|
| 1753 |
cursor.execute(query, [user_data.get(field, '') for field in fields])
|
|
|
|
|
|
|
| 1754 |
except Exception as e:
|
| 1755 |
print(f"Error inserting row: {row}")
|
| 1756 |
print(f"Error message: {str(e)}")
|
|
@@ -1812,7 +1817,6 @@ def upload_csv():
|
|
| 1812 |
|
| 1813 |
|
| 1814 |
|
| 1815 |
-
|
| 1816 |
|
| 1817 |
|
| 1818 |
@app.route('/gc_in', methods=['GET'])
|
|
|
|
| 1749 |
VALUES ({placeholders})
|
| 1750 |
'''
|
| 1751 |
|
| 1752 |
+
# Вывод информации о строке перед записью в базу данных
|
| 1753 |
+
print(f"Inserting row: {user_data}")
|
| 1754 |
+
|
| 1755 |
try:
|
| 1756 |
cursor.execute(query, [user_data.get(field, '') for field in fields])
|
| 1757 |
+
# Вывод информации о том, что запись была успешно выполнена
|
| 1758 |
+
print(f"Row inserted successfully: {user_data}")
|
| 1759 |
except Exception as e:
|
| 1760 |
print(f"Error inserting row: {row}")
|
| 1761 |
print(f"Error message: {str(e)}")
|
|
|
|
| 1817 |
|
| 1818 |
|
| 1819 |
|
|
|
|
| 1820 |
|
| 1821 |
|
| 1822 |
@app.route('/gc_in', methods=['GET'])
|