I can't use computed and pydantic_model_creator properly. #1947
Unanswered
KAMRON-DEVELOPER
asked this question in
Q&A
Replies: 1 comment
-
For compute field, you have to explicit init model before create the pydantic model class: There are several examples for pydantic. |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I just wanted to add followers_count and followings_count to response when calling model_dump() or model_dump_json().
# users_app/test.py
# users_app/models.py
# console error log
Beta Was this translation helpful? Give feedback.
All reactions