Skip to content

Commit ef5d728

Browse files
committed
Merge branch 'master' into two-point-oh
2 parents d50af87 + e4d9336 commit ef5d728

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ PyMongo support for Flask applications
44

55
## Quickstart
66

7-
from flask import Flask
8-
from flask_pymongo import PyMongo
7+
```python
8+
from flask import Flask
9+
from flask_pymongo import PyMongo
910

10-
app = Flask(__name__)
11-
app.config["MONGO_URI"] = "mongodb://localhost:27017/myDatabase"
12-
mongo = PyMongo(app)
11+
app = Flask(__name__)
12+
app.config["MONGO_URI"] = "mongodb://localhost:27017/myDatabase"
13+
mongo = PyMongo(app)
1314

14-
@app.route("/")
15-
def home_page():
16-
online_users = mongo.db.users.find({"online": True})
17-
return render_template("index.html",
18-
online_users=online_users)
15+
@app.route('/')
16+
def home_page():
17+
online_users = mongo.db.users.find({'online': True})
18+
return render_template('index.html', online_users=online_users)
19+
```
1920

2021
## More Info
2122

0 commit comments

Comments
 (0)