Module 03 of 12

URLs & Views

Lessons

About This Module

Every Django page starts the same way: a request arrives, Django matches its URL against a list of patterns, and the matching view returns a response. Understanding this flow is the single most useful skill in the framework, because everything else (templates, models, forms, authentication) plugs into it.

This module covers both halves. On the routing side you will learn how the URLconf works, how path() and include() connect project-level and app-level URLs, how to capture values from a URL, and why giving URLs names and reversing them keeps your code maintainable. On the view side you will write function-based views first, so you can see exactly how a request becomes a response, and then move to class-based views and Django's generic views for common patterns like lists, detail pages, and create, update, and delete.

Watch the lessons in order, then continue on to Templates & Static Files. Some of these videos were recorded on older Django releases, so check the official documentation if a detail differs on your install.

Lessons

4 videos
01

Python Django Tutorial for Beginners

Programming with Mosh builds a first Django project step by step. Focus on the sections about creating an app, writing views, and mapping URLs to views, which show the full path from a request to a response.

02

Master Django Routes and Views

Ebere Plenty covers defining URL patterns in urls.py, the difference between function-based and class-based views and when to use each, rendering templates, and passing data from a view to a template.

03

Python Django Tutorial: Create, Update, and Delete Posts

Corey Schafer builds create, update, and delete pages for a blog using Django's generic class-based views, a practical look at how CBVs remove repetitive view code.

04

Python Django Web Framework: Full Course for Beginners

The longer Coding for Entrepreneurs course from the previous module, revisited for its later sections: dynamic URL linking, reversing URLs, in-app URLs and namespacing, ListView, DetailView, CreateView, UpdateView, DeleteView, and converting a function-based view to a class-based one.