5. Creating Multi-page Web Applications

In the previous chapters, we developed Web applications that had only one page: the main page. In this chapter, we’ll start creating multi-page Web applications. In particular, we’ll add pages to our application for each user in the database. Each page won’t actually exist, though, and just sit around waiting for the user to access it. Instead, the user pages will be created on the fly.

You create pages with code in views.py in a Django application, and for that reason we’ll be adding code beyond the main page to our application in this chapter. We’ll get Django to help by informing us what page the user is actually accessing, so we’ll be able to retrieve the user’s data and display it later in this chapter. ...

Get Django: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.