Django
A full-featured Python web framework with built-in ORM, admin panel, auth, and templating. Django gives you a complete backend out of the box — database models, admin UI, user accounts, forms, and routing. 'Batteries included.' Great for content sites and CRUD apps.
Adrian Holovaty, Simon Willison · Created Django at a Kansas newspaper in 2003
- Content-heavy sites (CMS, news, e-commerce).
- CRUD apps with admin needs.
- Teams wanting everything built-in.
- API-only backends (use FastAPI).
- Microservices (use FastAPI/Go).
- Real-time/WebSocket-heavy (use FastAPI/Node).
Definition
Django is a full-stack Python web framework. ORM maps Python classes to database tables. Admin auto-generates a CRUD UI. Auth, forms, sessions, middleware, and templating built in. Django REST Framework adds API support. Migrations manage schema changes.
Why it exists
To let teams build complete web apps fast by providing every common piece (ORM, admin, auth, forms) so you focus on business logic, not plumbing.
How it works
Define models (Python classes → DB tables). makemigrations/migrate create schema. Admin auto-generates CRUD UI. Views handle requests; templates render HTML. URLs map to views. DRF adds serializers and API views for REST.
Scaling limits
Monolithic by default (harder to split microservices). ORM can generate slow queries (N+1). Synchronous by default (async support is newer). Heavier than FastAPI for API-only.
Cost shape
Free and open source.
Alternatives
- FastAPI — API-first, async, typed, but no admin/ORM.
- Flask — Minimal, you assemble everything.
Failure modes
- ORM N+1 queries.
- Monolith scaling challenges.
- Synchronous blocking.