0PricingLogin
Django Academy · Lesson

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

  1. Writing a Function-Based View
  2. URL Patterns with path()
  3. Capturing URL Parameters
  4. Including App URLs and Naming Routes
← Back to Django Academy