Commit 806f70e4 authored by Yury's avatar Yury

docs: fix docs mismatch

parent 4f384e59
Pipeline #329 passed with stages
in 4 minutes and 46 seconds
......@@ -21,10 +21,10 @@ Usage
import asyncio
from mdocument import Document
import motor.motor_asyncio
from mdocument import Document
client = motor.motor_asyncio.AsyncIOMotorClient()
class Comment(Document):
......@@ -38,14 +38,12 @@ Usage
database = "mdocument"
client = client
@Document.related(self_field="_id", other_field="video")
@Document.related(Comment.Field.video, self_field_name="_id")
def comments(self):
pass
async def main():
video = await Video.create(
title="Test",
)
video = await Video.create(title="Test")
comment1 = await Comment.create(
video=video._id,
......@@ -99,7 +97,7 @@ Example:
database = "mdocument"
client = client
@Document.related("Artist._id", "Album._id")
@Document.related(Album.Field._id, self_field_name="_id")
def albums(self):
pass
......@@ -108,7 +106,7 @@ Example:
database = "mdocument"
client = client
@Document.related("Album._id", "Song._id")
@Document.related(Song.Field._id, self_field_name="_id")
def songs(self):
pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment