1
0
mirror of https://github.com/django/django.git synced 2025-07-17 16:19:12 +00:00

[3.1.x] Fixed #32083 -- Added link back to migrating section in multi-db docs example.

Backport of 1b32b2f614c5c45f4a0f270ae7273c2d8e16617b from master
This commit is contained in:
Carlton Gibson 2020-10-08 12:45:06 +02:00 committed by Carlton Gibson
parent 82bdc51e7a
commit d1f791d394

View File

@ -76,6 +76,8 @@ If you attempt to access a database that you haven't defined in your
:setting:`DATABASES` setting, Django will raise a :setting:`DATABASES` setting, Django will raise a
``django.db.utils.ConnectionDoesNotExist`` exception. ``django.db.utils.ConnectionDoesNotExist`` exception.
.. _synchronizing_multiple_databases:
Synchronizing your databases Synchronizing your databases
============================ ============================
@ -402,7 +404,8 @@ setting listed the two routers in the other order,
catch-all nature of the PrimaryReplicaRouter implementation would mean catch-all nature of the PrimaryReplicaRouter implementation would mean
that all models would be available on all databases. that all models would be available on all databases.
With this setup installed, lets run some Django code:: With this setup installed, and all databases migrated as per
:ref:`synchronizing_multiple_databases`, lets run some Django code::
>>> # This retrieval will be performed on the 'auth_db' database >>> # This retrieval will be performed on the 'auth_db' database
>>> fred = User.objects.get(username='fred') >>> fred = User.objects.get(username='fred')