- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ItemCreate (0.25 sec)
-
docs_src/sql_databases_peewee/sql_app/crud.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 843 bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/schemas.py
if isinstance(res, peewee.ModelSelect): return list(res) return res class ItemBase(BaseModel): title: str description: Union[str, None] = None class ItemCreate(ItemBase): pass class Item(ItemBase): id: int owner_id: int class Config: orm_mode = True getter_dict = PeeweeGetterDict class UserBase(BaseModel):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 868 bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/main.py
return db_user @app.post( "/users/{user_id}/items/", response_model=schemas.Item, dependencies=[Depends(get_db)], ) def create_item_for_user(user_id: int, item: schemas.ItemCreate): return crud.create_user_item(item=item, user_id=user_id) @app.get("/items/", response_model=List[schemas.Item], dependencies=[Depends(get_db)]) def read_items(skip: int = 0, limit: int = 100):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 2.2K bytes - Viewed (0)