Writing a Function-Based View
Create a view that returns a response.
What a View Really Is
A Django view is just a Python function that takes a request and returns a response. That is the whole contract. 🙂
The First Argument: request
Every view's first parameter is the request object. Django hands it to you automatically when a URL matches your view.
All lessons in this course
- Writing a Function-Based View
- URL Patterns with path()
- Capturing URL Parameters
- Including App URLs and Naming Routes