SQL Joins w/ SqlAlchemy: Part #86 Python API Course

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I also noticed this same error at 10:00 but realised he inherited from the BaseModel at 10:15 "after playing around". This solved the issue for me. Capitalizing the p in post didn't actually do anything ig

manuelofosu
Автор

Thanks once more for this brilliant course. Unfortunately this Join Query is the first thing, which is not working with SQL Alchemy v2.020 I had to downgrade to v1.4 I wonder if someone knows how this is working now... ?

friedrichsiever
Автор

Thanks for this course, it is great!

I would like to change the response scheme to get rid of the "Post" nesting. I tried several different ways but unfortunately I'm stuck.

Could you give any hints on how this could be done?

cacek
Автор

class PostOut(BaseModel):
Post: Post
votes: int
class Config:
from_attributes = True
Inherit it from BaseModel instead of Post

bokuto
welcome to shbcf.ru