Open-Source Wikis

/

Django

/

Django

django/django

Django

Django is a high-level Python web framework that handles the boring parts of building web applications so developers can focus on writing application logic. It pairs an object-relational mapper, a URL router, a template engine, a forms system, an admin interface, and a long list of contrib apps under one consistent API. This wiki maps the source tree of the framework itself (django/django on GitHub), not user-facing application docs — for the polished tutorial and reference material, see docs.djangoproject.com.

Django admin authenticated index

Django admin Article changelist

What this codebase is

The repository contains the source for the Django Python package, its full test suite (tests/), and the official documentation (docs/, the source of djangoproject.com/docs). The package is published to PyPI as Django. It is a pure-Python project — no compiled extensions ship with the wheel — and depends on only asgiref and sqlparse at runtime (see pyproject.toml).

The framework is structured as a set of cooperating subsystems organised under the top-level django/ package:

  • django/db/ — the ORM, query builder, schema editor, transaction layer, and database backends
  • django/db/migrations/ — schema migration generation, graph resolution, and execution
  • django/http/HttpRequest, HttpResponse, multipart parsing, and streaming responses
  • django/urls/ — URL routing, resolvers, and reverse lookup
  • django/views/ — function- and class-based view machinery, plus debug and error views
  • django/template/ — the Django template language, default tags/filters, and pluggable backends
  • django/forms/ — form fields, widgets, formsets, and model-bound forms
  • django/middleware/ — built-in middleware (CSRF, common, cache, locale, security, gzip, CSP, clickjacking)
  • django/core/ — management commands, mail, cache, signing, validators, and the request handlers (WSGI/ASGI)
  • django/conf/settings lazy object and global defaults
  • django/contrib/ — optional apps shipped with Django: admin, auth, contenttypes, sessions, messages, sites, staticfiles, gis, postgres, redirects, flatpages, humanize, sitemaps, syndication, admindocs
  • django/utils/ — shared helpers (caching, encoding, html, dates, functional tools, translation, autoreload)
  • django/test/ — test client, test runner, and TestCase base classes

Who uses it

Anyone running Python on the web. Django ships single-process (runserver), WSGI, and ASGI entry points and supports SQLite, PostgreSQL, MySQL/MariaDB, and Oracle out of the box. Major sites that use Django include Instagram, Pinterest, NASA, and Mozilla, but the framework is just as common in small CRUD apps and government services.

  • System architecture — how a request flows through the framework, with diagrams.
  • Getting started — clone, install in editable mode, and run the test suite.
  • Glossary — Django-specific vocabulary (model, manager, queryset, app, project, etc.).
  • By the numbers — codebase statistics.
  • Lore — twenty years of Django history.
  • How to contribute — Trac tickets, the patch workflow, and review expectations.
  • Systems — deep dives into each major subsystem.

A note on scope

Django is a 20-year-old, ~165 kLOC framework with a comparable amount of test code. This wiki is a navigational map of the django/ package, not a replacement for the official user documentation. When in doubt, the canonical reference is docs/ (rendered at docs.djangoproject.com).

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Django – Django wiki | Factory