Grokking Django
Learn Django step by step: models and the ORM, views, templates, forms, authentication, REST APIs with DRF, caching, security, and deployment.

Course Overview
Django is a Python web framework. When a browser asks for a page, Django matches the address to a view, the view reads data through models, a template turns that data into HTML, and Django sends the result back as the response. This course teaches each of those steps, and it shows what Django does at every point so you can predict how your code will behave. You start by installing Django and creating a project with a custom user model, then follow a request through the framework. Next you define models, run migrations, and query the database with the ORM. You then write views and URL patterns, render pages with templates, build forms that validate input, and add user accounts with login, logout, and permissions. Later chapters take the same blog project further. You build a REST API with Django REST framework, add middleware and caching, and find problems with the Debug Toolbar and logging. The last lessons cover security settings and deployment. Every example was run on Django 6.1, so the outputs you read are the outputs Django printed. Every chapter ends with an assessment that explains each answer.
What you'll learn in Grokking Django
- Follow a request through Django, from the URL resolver and middleware to the view, the template, and the response.
- Define models, create and apply migrations, and convert existing data with data migrations.
- Connect models with ForeignKey, ManyToManyField, and OneToOneField, and choose what happens on delete.
- Render pages with templates, tags, filters, and template inheritance, and serve CSS, JavaScript, and images.
- Register users, log them in and out, protect pages, and grant permissions to users and groups.
- Write middleware, and speed up pages with Django caching, from a single value to a whole site.
- Secure a project for production and deploy it with WhiteNoise and an application server.
- Set up a project with a custom user model, and know why it must exist before the first migration.
- Query the database with the ORM, and avoid extra queries with select_related and prefetch_related.
- Write function-based and class-based views, map them to URL patterns, and return redirects, JSON, and errors.
- Build forms that validate input, and save data with ModelForms.
- Build a REST API with Django REST framework: serializers, generic views, ViewSets, routers, and pagination.
- Find problems with the Debug Toolbar, logging, and breakpoints, and show custom error pages.
Course Content
What people say about our courses






About the Author

Arslan Ahmad
Industry Expertise & Leadership
Arslan Ahmad is the lead author of Grokking Django. As the founder of Design Gurus and a former FAANG hiring manager, he has worked at industry giants like Facebook (now Meta) and Microsoft.
He has conducted hundreds of system design interviews, giving him unique insight into what top tech companies look for in candidates.
The course also incorporates expertise from senior engineers at Google, Meta, Amazon, Microsoft, and Uber, ensuring you learn system design best practices from professionals who have built and scaled real-world systems.
500+
Interviews Conducted
10k+
Students Taught
Related Courses
$197
$72
$48
FAQs
What is Grokking Django?
It is a course on Django, the Python web framework. It starts with how Django turns a request into a response, then covers models and the ORM, views and URLs, templates, forms, authentication, REST APIs with Django REST framework, middleware and caching, debugging, security, and deployment.
Who is this course for?
It is for Python developers who want to build web applications and have not used Django or another web framework before. It also helps developers who already use Django and want to understand what the framework does at each step of a request.
What do I need to know before I start?
You need a working knowledge of Python: functions, classes, modules, and installing packages with pip. The level of Grokking Python Fundamentals is enough. You do not need any experience with web development or databases.
What do I need to follow along?
You need Python and a code editor. The first chapter shows how to create a virtual environment, install Django, and start a project. The course does not include a coding environment in the browser, so you run the examples on your own computer, with SQLite as the database.
Which version of Django does the course use?
The examples were run on Django 6.1 and Django REST framework 3.18, the current releases at the time of the review, and the outputs in the lessons are real output from those runs. The lessons also point out where current Django differs from older tutorials, like logging out with a POST request.
Do I build a project in the course?
Yes. One blog application runs through every chapter. You add articles, authors, comments, and tags, then pages, forms, user accounts, an API, caching, and production settings to the same project, so each chapter builds on the code you already have.
Are there quizzes or assessments?
Yes. Every chapter ends with an assessment, and each attempt draws a set of questions from a larger pool, so a second attempt gives you different questions. Most questions describe a piece of code or a request and ask what Django does, and every option comes with an explanation.
Does the course cover Django REST framework?
Yes. You first build a small JSON API with plain Django views, then rebuild it with Django REST framework using serializers, API views, generic views, ViewSets, and routers. You also add token authentication, an owner-only permission, and pagination.
Does the course cover deployment?
Yes. You read settings from environment variables, configure a production database, collect static files and serve them with WhiteNoise, run the project under an application server behind a web server, and check it with manage.py check --deploy. A separate lesson covers security settings like HTTPS, HSTS, and Content Security Policy.
What does the course not cover?
It does not teach testing as a full topic, customizing the admin site, async views, background jobs with Celery, signals, Docker, JWT authentication, Django Channels, or front-end frameworks. You will need other material for those subjects.
