zyliu commited on
Commit
b345d93
1 Parent(s): ad29e91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -8,12 +8,15 @@ import os
8
  # db = client["todo_db"]
9
 
10
  uri = os.environ.get("mongo_uri", None)
 
11
  print(f"uri: {uri}")
12
  # Create a new client and connect to the server
13
  client = pymongo.MongoClient(uri, server_api=ServerApi('1'))
14
  db = client["todo_db"]
15
  collection = db["tasks"]
 
16
 
 
17
  # Define a function to create a task
18
  def create_task(task, category, priority):
19
  # Create a dictionary with the task information
@@ -108,3 +111,6 @@ elif navigation == "Delete":
108
  if st.button("Delete"):
109
  # Delete the task
110
  delete_task(task_id)
 
 
 
 
8
  # db = client["todo_db"]
9
 
10
  uri = os.environ.get("mongo_uri", None)
11
+ st.success(f"uri: {uri}")
12
  print(f"uri: {uri}")
13
  # Create a new client and connect to the server
14
  client = pymongo.MongoClient(uri, server_api=ServerApi('1'))
15
  db = client["todo_db"]
16
  collection = db["tasks"]
17
+ st.success("Task deleted successfully!")
18
 
19
+ '''
20
  # Define a function to create a task
21
  def create_task(task, category, priority):
22
  # Create a dictionary with the task information
 
111
  if st.button("Delete"):
112
  # Delete the task
113
  delete_task(task_id)
114
+
115
+ '''
116
+