5.2 The Purpose of Views and URL Configurations

A webpage consists of (1) the data contained in the webpage and (2) the URL (location) of the webpage. Django follows this abstraction by splitting the Controller into two parts. Django views give Django the data of the webpage. The URL associated with each view is listed in the URL configuration.

Warning!

For many beginners, the name of the Controller causes confusion: Django views are unrelated to MVC architecture’s View. Django views are one half of the Controller. Django templates map to MVC’s Views. To differentiate between the two, I capitalize View when referring to MVC and use lowercase view when referring to Django.

In the rest of this section, we expand on the nature and purpose of ...

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.