Skip to content

Commit 69af309

Browse files
authored
docs(adr): reject a Django bootstrapper (#182)
Django's observability is owned by settings.py, which runs before any object a bootstrapper could be handed, so the construct-and-hand-over contract has no natural expression there.
1 parent 4f1b829 commit 69af309

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# No Django bootstrapper
2+
3+
**Decision:** `lite-bootstrap` will not ship a Django bootstrapper. Django's size makes it the
4+
framework most likely to be proposed by someone who has not hit the contract below.
5+
6+
Every bootstrapper keeps one contract: the user constructs the application, passes it in, and gets
7+
the same object back. Django's observability is conventionally owned by `settings.py` — `MIDDLEWARE`
8+
ordering, installed apps — which runs before any object a bootstrapper could be handed, so the
9+
contract has no natural expression there. ADR-0001 is the calibration: FastMCP was the hardest
10+
framework to fit and still had an application object to attach to.
11+
12+
Rejected: **attach to a constructed `ASGIHandler` instead.** This is the shape that would fit, and
13+
today it means putting middleware outside `MIDDLEWARE`, diverging from every Django deployment guide
14+
and from what a Django user would debug against.
15+
16+
**Revisit trigger:** a released, maintained path that attaches instrumentation to a constructed
17+
`ASGIHandler` (or equivalent) without going through `settings.py`.

0 commit comments

Comments
 (0)