update docs part 1

This commit is contained in:
collerek
2020-10-06 19:09:58 +02:00
parent dd46dbcfd4
commit ba0990d05b
11 changed files with 505 additions and 212 deletions

View File

@ -8,12 +8,13 @@ metadata = sqlalchemy.MetaData()
class Course(ormar.Model):
# if you omit this parameter it will be created automatically
# as class.__name__.lower()+'s' -> "courses" in this example
__tablename__ = "my_courses"
__database__ = database
__metadata__ = metadata
class Meta:
# if you omit this parameter it will be created automatically
# as class.__name__.lower()+'s' -> "courses" in this example
tablename = "my_courses"
database = database
metadata = metadata
id = ormar.Integer(primary_key=True)
name = ormar.String(length=100)
completed = ormar.Boolean(default=False)
id: ormar.Integer(primary_key=True)
name: ormar.String(max_length=100)
completed: ormar.Boolean(default=False)