summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2020-07-15 10:27:46 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-16 21:12:13 +0200
commite63644d37bd2d428fb0f9c81b400bf8f8d2412b9 (patch)
tree16018f60e56dfb1e6df28c3a5492739d5e6851a3 /docs/topics
parent54dce8148ae1d2f662bbc51c4debf8549aaee081 (diff)
[3.1.x] Refs #31502 -- Made minor edits to Model._state docs.
Backport of 5ef6f626347f9ea13915f3cf5b8b045c5b42b102 from master
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/db/multi-db.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/topics/db/multi-db.txt b/docs/topics/db/multi-db.txt
index a01ce52f38..f4357642e6 100644
--- a/docs/topics/db/multi-db.txt
+++ b/docs/topics/db/multi-db.txt
@@ -239,9 +239,10 @@ database usage. Whenever a query needs to know which database to use,
it calls the master router, providing a model and a hint (if
available). Django then tries each router in turn until a database
suggestion can be found. If no suggestion can be found, it tries the
-current ``_state.db`` of the hint instance. If a hint instance wasn't
-provided, or the instance doesn't currently have database state, the
-master router will allocate the ``default`` database.
+current :attr:`instance._state.db <django.db.models.Model._state>` of the hint
+instance. If a hint instance wasn't provided, or :attr:`instance._state.db
+<django.db.models.Model._state>` is ``None``, the master router will allocate
+the ``default`` database.
An example
----------