Previous Page Next Page

Understanding Views

Rendering a view from an URL request is a multistep process in Django. When a Django server receives an URL request, it parses the URL and, using a set of previously defined patterns, determines which Python code should render the view.

The way it works is that as you design your website, you write Python functions that will build and render web pages. For each Python function, you define at least one URL pattern that will link a specific URL to that view function. The Django framework receives the URL request, handing the request to the view function and then sending the dynamically built response back to the web browser. We will discuss the URL configuration more in Hour 4, "Creating the Initial Views."

Previous Page Next Page