Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -769,7 +769,17 @@ def get_contacts_json():
|
|
769 |
|
770 |
|
771 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
772 |
|
|
|
|
|
|
|
773 |
|
774 |
|
775 |
|
|
|
769 |
|
770 |
|
771 |
|
772 |
+
@app.route('/contacts')
|
773 |
+
def show_contacts():
|
774 |
+
try:
|
775 |
+
# Fetch contacts data from database (as shown previously)
|
776 |
+
contacts = ... # Fetch contacts from database
|
777 |
+
|
778 |
+
return render_template('contacts.html', contacts=contacts), 200
|
779 |
|
780 |
+
except Exception as e:
|
781 |
+
print(f"Error showing contacts: {e}")
|
782 |
+
return "Database error. Please try again later.", 500
|
783 |
|
784 |
|
785 |
|