Django architecture.
Django is a Python web framework. Nodeway mapped the django/django repository at commit c896b3e, from 27 November 2026, and found 945 source files, 10,891 functions, classes and components, 18 routes and 14 database tables. This page is drawn from that map.
- Source files
- 945
- Functions and classes
- 10,891
- Confirmed calls
- 7,741
- Routes
- 18
- Tables
- 14
How the code is laid out
Most of it is Python: 921 files of 945, followed by JavaScript (22) and Shell (2).
The repository is split into 16 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are django (923 files), django/contrib (360 files), django/conf (176 files), django/db (123 files), django/core (112 files) and django/utils (48 files).
These are its top-level folders by number of source files, with 1 more file at the root. The biggest ones show their own largest folders underneath.
- django/package923 files18 routes · 14 tables
- contrib/package360 files18 routes · 14 tables
- conf/package176 files
- db/package123 files
- core/package112 files
- utils/package48 files
- template/package27 files
- scripts/15 files
- pr_limit/3 files
- pr_quality/3 files
- docs/6 files
- _ext/2 files
Where the code starts
Nodeway looked for files that define a main function, and for files named like a starting point (main, server, app, cli and similar) that at most one other file imports, then for index files that nothing imports. Ranked that way, then by how many files each one reaches through its imports:
| File | Reaches |
|---|---|
| django/core/asgi.py | 222 files |
| django/core/wsgi.py | 222 files |
| scripts/check_migrations.pydefines main | 213 files |
| scripts/pr_quality/check_pr.pydefines main | 2 files |
| scripts/pr_limit/check_pr.pydefines main | 1 file |
Routes
Nodeway found 18 routes and linked 18 to the function that handles them. All are under django/contrib (18).
Some of them
| Route | Method |
|---|---|
| /BaseAdminDocsView · django/contrib/admindocs/urls.py | ANY |
| /loginLoginView · django/contrib/auth/urls.py | ANY |
| /<path:url>flatpage · django/contrib/flatpages/urls.py | ANY |
| /tagsTemplateTagIndexView · django/contrib/admindocs/urls.py | ANY |
| /viewsViewIndexView · django/contrib/admindocs/urls.py | ANY |
| /modelsModelIndexView · django/contrib/admindocs/urls.py | ANY |
| /logoutLogoutView · django/contrib/auth/urls.py | ANY |
| /filtersTemplateFilterIndexView · django/contrib/admindocs/urls.py | ANY |
Data model
Nodeway found 14 database tables, defined with Django ORM. Code in the repository reads or writes 8 of them. The most used:
| Table | Used by |
|---|---|
| auth_permission4 columns · links to django_content_type · django/contrib/auth/models.py | 6 read2 write |
| django_content_type3 columns · django/contrib/contenttypes/models.py | 4 read1 write |
| geometry_columns8 columns · django/contrib/gis/db/backends/postgis/models.py | 3 read0 write |
| django_admin_log8 columns · links to django_content_type · django/contrib/admin/models.py | 2 read0 write |
| django_flatpage8 columns · links to django_site · django/contrib/flatpages/models.py | 2 read0 write |
| django_site3 columns · django/contrib/sites/models.py | 2 read0 write |
| django_redirect4 columns · links to django_site · django/contrib/redirects/models.py | 1 read0 write |
| USER_SDO_GEOM_METADATA4 columns · django/contrib/gis/db/backends/oracle/models.py | 1 read0 write |
One request, traced
Nodeway followed ANY /<path:url> from its route to the code that handles it, then along confirmed calls.
- ANY /<path:url>route · django/contrib/flatpages/urls.py
- flatpagefunction · django/contrib/flatpages/views.py:22
- render_flatpagefunction · django/contrib/flatpages/views.py:49
- redirect_to_loginfunction · django/contrib/auth/views.py:184
- urlencodemethod · django/http/request.py:722
- quotefunction · django/contrib/admin/utils.py:91
The most-called code
Ranked by how many different functions call each one, counting only calls the analyzer could confirm from the code. These are often the helpers worth reading first.
| Function | Callers |
|---|---|
| gettextfunction · django/utils/translation/__init__.py | 79 |
| _lazy_re_compilefunction · django/utils/regex_helper.py | 49 |
| writemethod · django/core/management/base.py | 47 |
| make_and_validate_keymethod · django/core/cache/backends/base.py | 43 |
| mark_safefunction · django/utils/safestring.py | 43 |
| quote_namemethod · django/db/backends/base/schema.py | 38 |
| import_stringfunction · django/utils/module_loading.py | 38 |
| force_bytesfunction · django/utils/encoding.py | 36 |
Open this repo in Nodeway
Nodeway is a desktop app that draws this map on your own computer, so you can click into any folder, read the code beside the map and trace a request yourself. Clone the repository:
git clone https://github.com/django/django.git- Install Nodeway for macOS, Windows or Linux: the getting started guide has every installer.
- Open the cloned folder. The first map is drawn on your machine and nothing is uploaded.
- Search for
gettextand trace what it calls, or pick a route and follow it to the database.
New to reading a codebase this size? See how to understand a large codebase and how to read a call graph.
Questions
What language is Django written in?
Mostly Python: 921 of its 945 source files at commit c896b3e, then JavaScript with 22.
Where does the Django code start?
The entry point that reaches the most code is django/core/asgi.py, which leads to 222 files through its imports.
How many routes does Django have?
Nodeway found 18 routes, 18 of them linked to a handler. The most are under django/contrib.
What database tables does Django use?
14 tables, defined with Django ORM. The most used are auth_permission, django_content_type and geometry_columns.
How this page was made
Generated from a map Nodeway's analyzer (version 18) made of django/django at commit c896b3e, committed on 27 November 2026. Tests, dependencies and build output are mostly left out. A call counts only when the analyzer could confirm its target from the code, so real totals are higher. The project will have changed since.