From 6e9f32f265b565869ddd70e60905d8b5b14a4a21 Mon Sep 17 00:00:00 2001 From: Valeryi Savich Date: Tue, 27 Feb 2018 11:39:26 +0300 Subject: [PATCH] Update README.rst --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 8ef5b92..23d06a3 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -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):