5.2.2 Django Views
The view is where webpage data is generated. The developer uses the view to interact with the database, load and render the template, and perform any other logic necessary to displaying a webpage.
A Django view is any Python callable (function, class, or object) that meets the following two requirements:
Accepts an HttpRequest
object as argument
Returns an HttpResponse
object
An HttpRequest
object contains all of the information about the page requested, any data the user is passing to the website, and any data the browser is ...
Get Django Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.