Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

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 learn5 sections · 21 lessons
Start learning

Course curriculum

Introduction 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. How the Web Works12 min
  2. Why Use a Web Framework12 min
  3. The MVC Model (Django's MTV)14 min
Setting 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. Virtual Environments12 min
  2. Installing Django10 min
  3. Pinning Your Dependencies10 min
Projects 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. Projects and Apps14 min
  2. manage.py — Your Project's Command Line10 min
  3. settings.py — One Place for Configuration14 min
  4. urls.py — The Site's Table of Contents12 min
  5. Running Your Project12 min
The 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. URL Patterns12 min
  2. Path Converters14 min
  3. Regex Paths with re_path()14 min
  4. Named URLs and reverse()15 min
  5. Middleware and Routing16 min
Models, 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. models.py and Migrations16 min
  2. Function-Based Views15 min
  3. Class-Based Views16 min
  4. admin.py — A Back Office for Free12 min
  5. tests.py — Proving It Works16 min