Appendix H. Request and Response Objects
Django uses request and response objects to pass state through the system.
When a page is requested, Django creates an
HttpRequest object that contains metadata about the request. Then Django loads the appropriate view, passing the
HttpRequest as the first argument to the view function. Each view is responsible for returning an
We've used these objects often throughout the book; this appendix explains the complete APIs for
HttpRequest represents a single HTTP request from some user-agent.
Much of the important information about the request is available as attributes on the
HttpRequest instance (see Table H-1). All attributes except