5.2.1 Django URL Configurations

As discussed in Chapter 1, Section 1.2, webpages were originally quite basic. The webpage’s data were contained in a flat file (a text file, an HTML file, or a PDF file, for instance). The URL was literally the location of the file on the server. If a user directed his or her browser to http://awebsite.com/project1/important.pdf, the awebsite.com server would go to the project1 directory and fetch the important.pdf file to give to the user’s browser.

Because modern web frameworks generate webpages dynamically, URLs have ceased to be the actual path to the data. A URL is now an abstraction, and it represents the logical path to data. For instance, the path /startup/jambon-software obviously requests information ...

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.