Django
Batteries-included framework with an ORM and admin.
Django is taught here in 12 lessons, running from Project layout and the ORM through to Deployment: gunicorn, static files and the security checklist. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | Python & Data Science |
| Lessons | 12 |
| Level | Beginner to intermediate |
| Reading time | about 3 hours |
| Prerequisites | Helpful, but not required: FastAPI |
Lessons
- Project layout and the ORMHow a Django project is structured, how models become database tables, and how to query them without generating an N+1 storm.
- Views and URLsURL routing with converters and namespaces, function and class-based views, and returning JSON from the same project.
- The admin and formsTurn the Django admin into a usable back office, and build server-validated forms with ModelForm — including the CSRF token people always forget.
- Templates and the Django template languageRender HTML from views, organise layouts with inheritance, and use the tags, filters and context processors that keep presentation out of Python.
- Migrations in depthHow makemigrations and migrate really relate, how to write data migrations, and how to change a schema without dropping a production table.
- Authentication, users and permissionsUse the built-in auth app for login, sessions and permissions, extend the user model correctly, and understand what password validators actually enforce.
- Static and media filesServe CSS, JavaScript and images correctly in development and production, and accept user uploads without turning your server into a file host.
- Testing Django appsWrite fast tests with TestCase, drive views through the test client, and check queries, redirects and form errors instead of just asserting 200.
- Django REST Framework: serializers and viewsetsTurn models into JSON with serializers, expose resources with generic views and routers, and lock the API down with permissions, pagination and authentication.
- Middleware, signals and management commandsRun code around every request, react to model changes without hiding logic, and package operations as repeatable manage.py commands.
- Settings, caching and query performanceSplit settings per environment, cache the expensive parts with a shared backend, and fix the database queries that make a Django app slow.
- Deployment: gunicorn, static files and the security checklistServe Django behind gunicorn and nginx, collect static files as part of the release, and turn the production checklist into a command you run in CI.
More in Python & Data Science
Python 3 NumPy pandas Matplotlib Jupyter Notebook Flask FastAPI SciPy Pillow Python 2.x R Julia
FAQ
How long does the Django course take?
It has 12 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for Django?
Not strictly. It helps to have read FastAPI first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after Django?
Continue with SciPy (3 lessons), the next course in Python & Data Science.
Last refreshed 2026-09-18.