update readme

This commit is contained in:
collerek
2020-09-24 11:41:10 +02:00
parent c156013f4b
commit ae34d21767
2 changed files with 10 additions and 8 deletions

View File

@ -268,12 +268,13 @@ await news.posts.clear()
The following keyword arguments are supported on all field types. The following keyword arguments are supported on all field types.
* `primary_key` * `primary_key: bool`
* `nullable` * `nullable: bool`
* `default` * `default: Any`
* `server_default` * `server_default: Any`
* `index` * `index: bool`
* `unique` * `unique: bool`
* `choices: typing.Sequence`
All fields are required unless one of the following is set: All fields are required unless one of the following is set:
@ -294,7 +295,9 @@ Available Model Fields:
* `DateTime()` * `DateTime()`
* `JSON()` * `JSON()`
* `BigInteger()` * `BigInteger()`
* `Decimal(lenght, precision)` * `Decimal(scale, precision)`
* `ForeignKey(to)`
* `Many2Many(to, through)`
[sqlalchemy-core]: https://docs.sqlalchemy.org/en/latest/core/ [sqlalchemy-core]: https://docs.sqlalchemy.org/en/latest/core/
[databases]: https://github.com/encode/databases [databases]: https://github.com/encode/databases

View File

@ -294,7 +294,6 @@ class ModelMetaclass(pydantic.main.ModelMetaclass):
new_model = super().__new__( # type: ignore new_model = super().__new__( # type: ignore
mcs, name, bases, attrs mcs, name, bases, attrs
) )
# breakpoint()
if hasattr(new_model, "Meta"): if hasattr(new_model, "Meta"):
new_model = populate_meta_orm_model_fields(attrs, new_model) new_model = populate_meta_orm_model_fields(attrs, new_model)