Grokking Django
Vote

0% completed

​

Introduction to Django Views

# blog/views.py from django.http import HttpResponse def welcome(request): return HttpResponse("Welcome to my Django blog!")

The function above is a complete Django view. It receives one argument, an object that describes the browser's request, and it returns an object that describes the answer Django sends back. A view is any Python callable that takes a request and returns a response, and every page of a Django site is produced by one.

This chapter follows a request through the code you write. This lesson builds the first views of the blog app and connects them to URLs

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content