This tutorial could not be loaded.
Loading tutorial...
Interactive tutorial
Build a small book catalog on your own computer while learning how Django models, views, templates, and URL routing work together. You will create a database model, apply migrations, display saved books, link to individual book pages, and diagnose common errors. Finish by checking populated, empty, and missing-book states in your browser.
Step 1 of 10
2 min
See How Django Builds a Page
See the catalog you’ll build and trace how Django turns a browser request into a page.
Step 2 of 10
6 min
Create Your Local Project
Create an isolated Django project and app, register the app, and verify the local configuration.
Step 3 of 10
4 min
Connect a URL to a View
Connect a local browser path to a Django view and check the response.
Step 4 of 10
5 min
Describe Books with a Model
Define a Book model and connect its fields and primary key to database roles.
Step 5 of 10
6 min
Create the Table and Save Books
Generate and apply the Book migration, then save and count two records using Django's shell.
Step 6 of 10
4 min
Render Your First Template
Create a minimal HTML template and render it from the existing book_list view.
Step 7 of 10
6 min
Display Books from the Database
Connect an ordered Book QuerySet to a template and safely check both populated and empty catalog states.
Step 8 of 10
7 min
Link to Individual Book Pages
Add named detail routes and links, retrieve a book safely, and test both existing and missing records.
Step 9 of 10
4 min
Find the Layer Behind an Error
Use catalog symptoms to locate a failing layer and choose a focused correction.
Step 10 of 10
6 min
Verify and Explain Your Catalog
Verify the three-book catalog and trace a saved record through Django to the browser.
Video Courses
Advanced
Ideal for beginners
recommended
Thousands of online courses in video, ebooks and audiobooks.
To test your knowledge during online courses
Generated directly from your cell phone's photo gallery and sent to your email
Download our app via QR Code or the links below:.
+ 10 million
students
Free and Valid
Certificate
60 thousand free
exercises
4.8/5 rating in
app stores
Free courses in
video and ebooks