update readme
This commit is contained in:
17
README.md
17
README.md
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user