Skip to content

Fixed depriciated Pydantic and Starlette Templateresponse syntax - #13

Open
32bikram wants to merge 1 commit into
marty331:mainfrom
32bikram:main
Open

Fixed depriciated Pydantic and Starlette Templateresponse syntax#13
32bikram wants to merge 1 commit into
marty331:mainfrom
32bikram:main

Conversation

@32bikram

@32bikram 32bikram commented Aug 30, 2026

Copy link
Copy Markdown

Issue in schema/schema.py

  • in Pydantic orm_mode = True is depreciated in pydantic v2. Changed that to - model_config = ConfigDict(from_attributes = True) supported in newer version.

Issue in main.py

  • The TemplateResponse signature has been changed from TemplateResponse(name: str, context: dict = None, ...) to TemplateResponse(request: Request, name: str, context: dict = None, ...) . So that has been adjusted.

How to generate this errors?

  • run the server using:
  • 'uvicorn main:app'

Contributor's Note-

  • Hey new contributor to open-soure here, found this repo in reddit. Would love to contribute more if its active. I would love to work on features like delete books, delete authors that are open in issues.

…ng has been implemented

- orm_mode = True is no loger supported, that has been changed to model_config = ConfigDict(form_attributes = True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant