Codebase maps / django/django
The Django codebase, as a map.
Django's repository is one big Python package, split by job: the database layer, URLs, views, templates, forms, and the optional "contrib" apps such as the admin. Here is what each part does - and the whole repository as a map you can open and explore.
How Django is organized
Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. These are the parts of its repository, and what each one does.
django/db/models
Models and the ORM. A model is "the single, definitive source of information about your data" - usually one database table - and query.py holds the QuerySet, "the public API for the ORM".
django/db/migrations
Migrations: how changes you make to your models (adding a field, deleting a model) reach your database schema. Database backends (PostgreSQL, MySQL, SQLite, Oracle) are next to it in django/db/backends.
django/urls
The URL dispatcher. resolvers.py "converts requested URLs to callback view functions".
django/views and django/http
A view takes a web request and returns a web response; django/http holds the HttpRequest and HttpResponse classes, and django/views the built-in generic views.
django/template
Templates: support for pluggable template engines, and Django's own template language with its tags and filters.
django/forms
"Django validation and HTML form handling" - forms that check what visitors send and draw the HTML for it.
django/core
The machinery around a request: handlers/ passes each request through the middleware listed in settings.MIDDLEWARE and on to your view; management/ holds the commands behind django-admin and manage.py.
django/contrib
The optional extras - Django's "batteries included": the admin site, user authentication, sessions, static files, sitemaps and more.
Where to start reading
Open these in the live map - click a file to read it beside the map, and point at it to see what it imports.
django/db/models/base.py- the Model class every model is built ondjango/db/models/query.py- QuerySet - filter(), get() and the rest of the ORMdjango/urls/resolvers.py- how a URL is matched to a viewdjango/core/handlers/base.py- how a request runs through middleware to your view
Good to know
Is this the official Django repository?
Yes: github.com/django/django, where Django is developed. Each part above is described from Django's own documentation, which lives in the same repository (docs/).
Is the map up to date?
The live map reads the repository when you open it, so it always shows the current code. The picture on this page was made on October 29, 2026.
Can I map my own project like this?
Yes. Paste any public GitHub link, or open a folder on your computer - your own code never leaves your device.