How it works...

The following are the things happening in the get() method, which is called for HTTP GET requests:

  • First, we create the form object, passing the request.GET dictionary-like object to it. The request.GET object contains all of the query variables that are passed using the GET method.
  • Then, the form object is passed to the get_queryset_and_facets() method, which returns the associated values via a tuple containing two elements: QuerySet and the facets dictionary respectively.
  • The current request object and retrieved QuerySet are passed to the get_page() method, which returns the current page object.
  • Lastly, we create a context dictionary and render the response.

If we needed to support it, we could also provide a post() method, which is called for HTTP POST requests.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.47.221