Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
Relrin authored Feb 27, 2018
1 parent c0fe046 commit 6e9f32f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Example
from umongo import Document, MotorAsyncIOInstance
from umongo.fields import StringField
from sanic_mongodb_ext import MongoDbExtension
app = Sanic(__name__)
# Configuration for MongoDB and uMongo
Expand All @@ -34,11 +33,13 @@ Example
MongoDbExtension(app) # uMongo client is available as `app.mongodb` or `app.extensions['mongodb']`
instance = app.config["LAZY_UMONGO"] # For a structured applications the lazy client very useful
# Describe the model
@instance.register
class Artist(Document):
name = StringField(required=True, allow_none=False)
# And use it later for APIs
@app.route("/")
async def handle(request):
Expand Down

0 comments on commit 6e9f32f

Please sign in to comment.