Why are we passing in request in context dictionary?


From my past experience with the MVC pattern, we can access request in our templates via request.something.this. Continuing your videos, it seems like I don't see you ever accessing the request object as you do with job in the later lectures.

With a quick search, "... when using templates.TemplateResponse in a FastAPI web application, it is not mandatory to pass the request parameter explicitly."

Why are we passing the request object if we are not using it?

FastAPITutorial

My priority is to help build a production-ready application using FastAPI

I prioritize quality over simplicity. Our challenging approach ensures you're prepared for real-world development.

Contacts

Refunds:

Refund Policy
Social

Follow us on our social media channels to stay updated with our latest tutorials and resources.

© Copyright 2022-2025 Team FastAPITutorial. All rights reserved.