-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π Add link to article in Russian "FastAPI: Π·Π½Π°ΠΊΠΎΠΌΠΈΠΌΡΡ Ρ ΡΡΠ΅ΠΉΠΌΠ²ΠΎΡΠΊΠΎΠΌ" #2564
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2564 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 242 243 +1
Lines 7396 7419 +23
=========================================
+ Hits 7396 7419 +23
Continue to review full report at Codecov.
|
π Docs preview for commit e7edcd9 at: https://5fe3307954191c47747c60ae--fastapi.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Screenshots for postman aren't loading
-
Think the link should be just renamed to an english one.
-
I severely disapprove the usage of
response_model_exclude=["password"], # new !
, you can get the same result by splitting your pydantic models, example: https://fastapi.tiangolo.com/tutorial/sql-databases/.
Thank you for noticing @ArcLightSlavik seems like I fixed images from postman and slugs -- the whole time I thought it requires much more work than it actually was. on third point I'll change that according to recommendation, but wondering why? Making separate in and out models and also separate ORM Model seems like a tons of code repeating almost the same thing every time. Is there any way to avoid this? |
Your confusing orm model and pydantic model. Orm model should include every single field in a table, but you wouldn't want to return every piece of information in the response all the time, this is where pydantic comes in. In tortoise it would be something like this? (pseudo code)
https://github.com/tortoise/tortoise-orm/blob/develop/tortoise/contrib/pydantic/creator.py#L117 |
Thanks for the help and suggestions @ArcLightSlavik ! Thanks for the article @trkohler ! π€ Nevertheless, when I try to access it I'm getting a 404. Maybe you updated the URL? |
yes, I have and forgot about it :( |
I fixed the link in PR, should work correctly now |
π Docs preview for commit 3ebf691 at: https://6020e8e15f91d4b2287bcb2e--fastapi.netlify.app |
Great, thanks! β |
Hi there! π
Hope it would be considered as useful addition!
In my article in Russian I covered how to:
Sorry in advance for the ugly link :( Gatsby generates it based on Russian headline and I still hadn't fix this.