Opened 66 minutes 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: | Triage Stage: | Unreviewed | |
| Has patch: | no | 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/