This is the largest site in the collection and the most opinionated, because it is written from actually shipping Django applications rather than from surveying the field. Django and Django REST Framework are assumed throughout.
The shape is roughly the order you meet the problems. Model your data, query it without generating a thousand queries, expose it as an API, decide who is allowed to call it, move the slow parts into the background, and store it somewhere that survives a restart. The database folder covers that last part independently, because the choice outlives any one application.
Getting Started with Django
Models and Data
| Model Design |
Getting the schema right, which is the decision everything else inherits |
| Saving Objects |
How writes actually go through |
| JSONField |
Storing and querying JSON in the database when a rigid schema does not fit |
| Migrations |
Changing the schema without losing data |
| Validators |
Enforcing conditions before a value reaches the database, across models, forms, and serializers |
Querying the ORM
Five pages on the same subject, because this is where Django applications get slow.
| Query Filters |
How the QuerySet API turns Pythonic queries into SQL |
| QuerySets |
The object you are actually manipulating |
| Query Math |
Aggregations, arithmetic, and window functions, all without dropping to raw SQL |
| Managers and QuerySets |
Encapsulating query logic where it belongs instead of scattering it through views |
| django-filter |
Filtering a queryset from form input, wired into class-based views and DRF |
| Indexing and Caching |
The two levers for query optimisation |
Authentication, Permissions, and Secrets
| Authentication |
DRF’s authentication system |
| User Models |
Modelling users, which is worth getting right before the first migration |
| Allauth |
Third-party accounts and social login |
| Permissions |
Controlling who can reach which endpoint |
| Permission Rules |
Object-level permissions expressed as plain Python functions, via django-rules |
| Permission Types |
Access control models for SaaS specifically, and how to choose between them |
| Security |
Secure coding practice, audits, and the tooling that finds problems |
| Secrets |
Keeping credentials out of the repository |
Background Work and Real Time
| django-q |
A task queue and scheduler built for Django, simpler than the alternative |
| Celery |
The distributed alternative, for when django-q is not enough |
| Channels |
WebSockets and async protocols, which is what makes chat, notifications, and live updates possible |
| MQTT |
The publish/subscribe broker, for IoT devices and sensors feeding the backend |
Operations
| Custom Commands |
Writing your own manage.py subcommands |
| Django Commands |
The built-in ones |
| Testing |
pytest against a Django project |
| Backups |
django-dbbackup for database and media, to local or cloud storage |
| Email |
Configuring and sending mail |
| Import and Export |
Moving data in and out as CSV, Excel, or JSON, from the admin or programmatically |
| PDF Generation |
WeasyPrint rendering HTML and CSS into invoices, reports, and receipts |
| Constance |
Admin-editable settings stored in the database, which gives you feature flags and thresholds without a redeploy |
| Recovery Metrics Setup |
The project-specific setup notes |
FastAPI
The async-first alternative, for API-only services, IO-heavy work and model serving. Both pages compare against the Django way at the end.
| FastAPI Stack |
The standard stack, one choice per layer, and a small working service from settings to tests and deployment |
| SQLAlchemy and Alembic |
The ORM and migrations outside Django: async sessions, the lazy-loading trap, and migrations that do not lose data |
ASP.NET Core
The compiled, statically typed alternative, explained from a Python and Django background. Read the pages in order. The examples have not been compiled yet.
| ASP.NET Core Overview |
The map of this section: how the 17 topics fit together, reading paths, the main differences from Django, and a first project in five milestones |
| .NET Overview |
The platform and its names, how C# builds and runs, supported versions, a small ASP.NET Core API, and a comparison with Django and FastAPI |
| C# and .NET Basics |
Nullability, records, generics, LINQ and async, mapped from Python |
| Hosting and Startup |
Program.cs, the Kestrel server, environments and graceful shutdown |
| Dependency Injection |
The service container, the three lifetimes and the captive dependency bug |
| Middleware Pipeline |
Required component order, custom middleware and endpoint filters |
| Configuration |
Layered settings, validated options classes and secrets |
| Routing |
Route templates, constraints, groups, precedence and URL generation |
| Web APIs |
Minimal APIs, controllers, typed results, OpenAPI, pagination, CORS and versioning |
| Model Binding and Validation |
Binding sources, request records, data annotations and FluentValidation |
| Entity Framework Core |
Entities, LINQ queries, change tracking, migrations, transactions and the N+1 problem on PostgreSQL |
| Authentication and Authorization |
JWT validation, cookies, Identity, policies and resource-based checks |
| Error Handling and Logging |
Problem Details, exception handlers, structured logs and OpenTelemetry |
| Caching and Performance |
Measurement, HybridCache, output caching, rate limiting and common bottlenecks |
| Background Work |
Hosted services, in-process queues, Hangfire, idempotent jobs and the outbox pattern |
| Real-Time and Service Calls |
Server-Sent Events, SignalR, WebSockets and gRPC |
| Server-Rendered UI |
Razor, Razor Pages, MVC, Blazor render modes and hosting a React build |
| Testing |
xUnit, WebApplicationFactory, Testcontainers and fake authentication |
| Deployment |
Docker images, health checks, reverse proxies, migrations and GitHub Actions with OIDC |
Databases
Independent of Django, because the choice outlives the application.
| SQL |
The language itself: querying, inserting, updating, deleting |
| Database Scaling |
Growing past one machine: pooling, caching, read replicas and replication lag, partitioning, sharding, and distributed SQL |
| PostgreSQL |
Database structure and practice, for the default choice |
| PostgreSQL Setup |
Getting it running |
| PostgreSQL Extensions |
What extensions are, how they work, and a catalogue grouped by use case |
| TimescaleDB |
Time-series inside Postgres, driven from Django |
| MySQL and MariaDB |
The other major open-source relational option |
| SQLite |
Serverless and zero-configuration, for embedded use and development |
| DuckDB |
The analytical counterpart, aimed at data and ML work rather than transactions |
| Redis |
In-memory store used as cache, broker, and database, with the data structures that make it flexible |
| InfluxDB |
The time-series backend, covered at length |
Not Covered Yet
- No Flask, and FastAPI is only two pages. Auth beyond JWT, WebSockets and FastAPI-specific deployment are touched on, not covered in depth.
- The ASP.NET Core examples have not been compiled or run. Each page says so at the top.
- Nothing on deployment. Getting the application onto a server is covered in Web Development and IaaS, not here, so this site stops at the code.
- No API versioning or deprecation strategy, despite the depth of DRF coverage.
- Nothing on rate limiting or throttling as a subject of its own.
- QuerySets, Indexing and Caching, and Email are thin at four to five cells, and indexing in particular deserves more given how often it is the answer.
Django/03_2_Permission_Types.ipynb has a stray space in its filename, which is why its URL looks wrong.
Back to top