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 trial


Igor Protsenko
Igor Protsenko
15,651 Points


Can you please clarify what does request.GET.get('q') means?

Jeff Morrison
Jeff Morrison
5,917 Points

In handling HTTP requests, the python request.GET.get('q') parses the request and handles requests.

request: the request handles the incoming request from the website GET: this is the method on the request. If a user loads the website via GET, then this will work get: this is a get method. It will 'get' the search parameters from the URL

This will work on: http://((website}}/?q=Query the request.GET.get('q') will return 'Query'

If you POST to that page, it won't do anything. If you just go to http://{{website}}, it won't do anything (no parameter to get).