Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialshreyas bukkawar
214 PointsProblem in Program
He passed request as an parameter for hello_world function but we did't send.
1 Answer
Haydar Al-Rikabi
5,971 PointsI will try to explain this in plain English for simplicity reason.
The "request" argument means that your view's function can handle a bunch of information passed in a request. The request with its associated info come from the user's browser to the web server, all the way to your view's function in Django.
In the video, Kenneth hasn't used the information that came in the request. He's just wanted to show the different elements associated with a view's function.
This is a list of all the info that comes with a url request. These info are called "Http Request Header Fields": https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields
Ikuyasu Usui
36 PointsIkuyasu Usui
36 PointsYes, Kenneth isn't using the request object because this hello_world() is intentionally the simplest view function.