YAYAQIU commited on
Commit
7411f2c
·
1 Parent(s): 38b8291

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -1,14 +1,14 @@
1
  import streamlit as st
 
2
  import pymongo
 
3
 
4
- ############################## MongoDB Config ##############################
5
  # Create a new client and connect to the server
6
- uri = "mongodb+srv://yaqiu8025:ZNjfJYRIZVVvshkz@cluster0.yczxpur.mongodb.net/?retryWrites=true&w=majority" # Put your connection string into it
7
- client = pymongo.MongoClient(uri)
8
- db = client[
9
- 'todo'] # Connect to a Database (MongoDB will create the database if it does not exist, and make a connection to it.)
10
- collection = db[
11
- 'tasks'] # Connect to a collection (MongoDB will create the collection if it does not exist, and make a connection to it.)
12
 
13
  ############################## App Setting ##############################
14
  categories = ['home', 'work', 'school']
 
1
  import streamlit as st
2
+ # import pandas as pd
3
  import pymongo
4
+ import certifi
5
 
6
+ ############################## MongoDB Config ##################### #########
7
  # Create a new client and connect to the server
8
+ uri = "mongodb+srv://yaqiu8025:N9WYhrFlCG8DAp4r@cluster0.yczxpur.mongodb.net/?retryWrites=true&w=majority" # Put your connection string into it
9
+ client = pymongo.MongoClient(uri, tlsCAFile=certifi.where())
10
+ db = client['todo'] # Connect to a Database (MongoDB will create the database if it does not exist, and make a connection to it.)
11
+ collection = db['tasks'] # Connect to a collection (MongoDB will create the collection if it does not exist, and make a connection to it.)
 
 
12
 
13
  ############################## App Setting ##############################
14
  categories = ['home', 'work', 'school']