5.10 Redirecting the Homepage

If you run Django’s development server and navigate to the root of the website, you’ll discover that we’ve missed a spot, as shown in Example 5.72.

Example 5.72: Shell Code

$ ./manage.py runserver

Browsing to http://127.0.0.1:8000/ will display an error page telling us the URL configuration doesn’t have a route for this page. While we’ve created a very detailed and clean URL configuration for all of our URLs, we’ve omitted the homepage, the root of our website.

We want to show the list of blog posts on the homepage. There are several ways we can go about doing so.

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.