Opened 3 weeks ago
Last modified 2 weeks ago
#37490 assigned New feature
Document using Django's ORM in other Python projects
| Reported by: | Tim Schilling | Owned by: | Django Sprints |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Dmytro Litvinov | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
References https://github.com/django/new-features/issues/35
There's a long standing desire to make the ORM easier to use outside of a regular Django project. (Script usage for example.) Django should explicitly support this use-case, and provide documentation to guide users.
While it is possible to use the Django ORM without much of Django's other machinery already, there is still some minimal configuration with settings and calling django.setup(). The necessary configuration is difficult to discover, so many users find it difficult to get started or don't think it's possible.
Paolo has an example in his blog post here: https://www.paulox.net/2026/02/20/django-orm-standalone-database-inspectdb-query/
Change History (4)
comment:1 by , 3 weeks ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 3 weeks ago
| Cc: | added |
|---|
comment:3 by , 2 weeks ago
comment:4 by , 2 weeks ago
| Has patch: | set |
|---|
We’re planning to work on this ticket during the PyCon HK Django sprint on November 15, 2026. We’ll post an update here after the sprint.