Merge branch 'master' of https://github.com/collerek/ormar into add_order_by
This commit is contained in:
27
.github/workflows/deploy-docs.yml
vendored
Normal file
27
.github/workflows/deploy-docs.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Build Documentation using MkDocs
|
||||||
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||||
|
# events but only for the master branch
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and Deploy Documentation
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Master
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set up Python 3.7
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install mkdocs-material
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
git pull
|
||||||
|
mkdocs gh-deploy
|
||||||
12
README.md
12
README.md
@ -79,8 +79,8 @@ class Album(ormar.Model):
|
|||||||
# note that type hints are optional so
|
# note that type hints are optional so
|
||||||
# id = ormar.Integer(primary_key=True)
|
# id = ormar.Integer(primary_key=True)
|
||||||
# is also valid
|
# is also valid
|
||||||
id = ormar.Integer(primary_key=True)
|
id: int = ormar.Integer(primary_key=True)
|
||||||
name = ormar.String(length=100)
|
name: str = ormar.String(max_length=100)
|
||||||
|
|
||||||
|
|
||||||
class Track(ormar.Model):
|
class Track(ormar.Model):
|
||||||
@ -89,10 +89,10 @@ class Track(ormar.Model):
|
|||||||
metadata = metadata
|
metadata = metadata
|
||||||
database = database
|
database = database
|
||||||
|
|
||||||
id = ormar.Integer(primary_key=True)
|
id: int = ormar.Integer(primary_key=True)
|
||||||
album = ormar.ForeignKey(Album)
|
album: Optional[Album] = ormar.ForeignKey(Album)
|
||||||
title = ormar.String(length=100)
|
title: str = ormar.String(max_length=100)
|
||||||
position = ormar.Integer()
|
position: int = ormar.Integer()
|
||||||
|
|
||||||
|
|
||||||
# Create some records to work with.
|
# Create some records to work with.
|
||||||
|
|||||||
@ -79,8 +79,8 @@ class Album(ormar.Model):
|
|||||||
# note that type hints are optional so
|
# note that type hints are optional so
|
||||||
# id = ormar.Integer(primary_key=True)
|
# id = ormar.Integer(primary_key=True)
|
||||||
# is also valid
|
# is also valid
|
||||||
id = ormar.Integer(primary_key=True)
|
id: int = ormar.Integer(primary_key=True)
|
||||||
name = ormar.String(length=100)
|
name: str = ormar.String(max_length=100)
|
||||||
|
|
||||||
|
|
||||||
class Track(ormar.Model):
|
class Track(ormar.Model):
|
||||||
@ -89,10 +89,10 @@ class Track(ormar.Model):
|
|||||||
metadata = metadata
|
metadata = metadata
|
||||||
database = database
|
database = database
|
||||||
|
|
||||||
id = ormar.Integer(primary_key=True)
|
id: int = ormar.Integer(primary_key=True)
|
||||||
album = ormar.ForeignKey(Album)
|
album: Optional[Album] = ormar.ForeignKey(Album)
|
||||||
title = ormar.String(length=100)
|
title: str = ormar.String(max_length=100)
|
||||||
position = ormar.Integer()
|
position: int = ormar.Integer()
|
||||||
|
|
||||||
|
|
||||||
# Create some records to work with.
|
# Create some records to work with.
|
||||||
|
|||||||
@ -50,7 +50,7 @@ Will produce:
|
|||||||
'name': mappingproxy({'allow_blank': False,
|
'name': mappingproxy({'allow_blank': False,
|
||||||
'autoincrement': False,
|
'autoincrement': False,
|
||||||
'choices': set(),
|
'choices': set(),
|
||||||
'column_type': String(length=100),
|
'column_type': String(max_length=100),
|
||||||
'curtail_length': None,
|
'curtail_length': None,
|
||||||
'default': None,
|
'default': None,
|
||||||
'index': False,
|
'index': False,
|
||||||
|
|||||||
Reference in New Issue
Block a user