Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import os
|
|
5 |
|
6 |
|
7 |
uri = os.environ["MONGO_CONNECTION_STRING"]
|
8 |
-
client = MongoClient(uri)
|
9 |
db = client["Cosmo"]
|
10 |
col = db["Tasks"]
|
11 |
|
@@ -17,4 +17,7 @@ task_values = {
|
|
17 |
"status" : st.text_input("Status")
|
18 |
}
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
5 |
|
6 |
|
7 |
uri = os.environ["MONGO_CONNECTION_STRING"]
|
8 |
+
client = MongoClient(uri, tlsCertificteKeyFile= "files/cert.pem")
|
9 |
db = client["Cosmo"]
|
10 |
col = db["Tasks"]
|
11 |
|
|
|
17 |
"status" : st.text_input("Status")
|
18 |
}
|
19 |
|
20 |
+
if st.button("Create Task"):
|
21 |
+
col.insert_one(task_values)
|
22 |
+
st.success("Task Created Successfully!")
|
23 |
+
st.balloons()
|