Skip to content
Pebellslearn by building

The course

Django

Learn how a Django project is put together and how a request travels through it. You will set up a clean environment, create a project and an app, route URLs, write views, define a model and test it — all while growing one small cookbook site.

Ready to learn

Your path through the ideas

Inside the course

6 modules · 21 lessons
CLI tools & setup · Start here

Install your tools, choose your setup and verify a local run.

02Introduction to Django3 lessons

See the request and response that sit behind every web page, why teams reach for a framework instead of writing that plumbing by hand, and how Django splits a site into models, views and templates.

  1. 01How the Web Works12 min
  2. 02Why Use a Web Framework12 min
  3. 03The MVC Model (Django's MTV)14 min
03Setting Up: Virtual Environments and Installing Django3 lessons

Give the cookbook its own virtual environment, install Django into it, and record exact versions so the project can be rebuilt on any machine.

  1. 01Virtual Environments12 min
  2. 02Installing Django10 min
  3. 03Pinning Your Dependencies10 min
04Projects and Apps5 lessons

Create a Django project and your first app, learn what manage.py, settings.py and urls.py are for, and start the development server to see the site in a browser.

  1. 01Projects and Apps14 min
  2. 02manage.py — Your Project's Command Line10 min
  3. 03settings.py — One Place for Configuration14 min
  4. 04urls.py — The Site's Table of Contents12 min
  5. 05Running Your Project12 min
05The Request–Response Flow5 lessons

Write URL patterns, capture values with path converters and regular expressions, name your URLs so links never go stale, and see where middleware wraps every request and response.

  1. 01URL Patterns12 min
  2. 02Path Converters14 min
  3. 03Regex Paths with re_path()14 min
  4. 04Named URLs and reverse()15 min
  5. 05Middleware and Routing16 min
06Models, Views, Admin and Tests5 lessons

Define the Recipe model and migrate it, answer requests with function-based and class-based views, manage recipes in the admin, and prove it all works with tests.

  1. 01models.py and Migrations16 min
  2. 02Function-Based Views15 min
  3. 03Class-Based Views16 min
  4. 04admin.py — A Back Office for Free12 min
  5. 05tests.py — Proving It Works16 min
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.