Skip to content
Discussion options

You must be logged in to vote

For compute field, you have to explicit init model before create the pydantic model class:

Tortoise.init_models(["__main__"], "models")

There are several examples for pydantic.
And welcome to make PR if you have new example to share.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KAMRON-DEVELOPER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants