diff options
| author | Loic Bistuer <loic.bistuer@gmail.com> | 2015-01-09 00:10:10 +0700 |
|---|---|---|
| committer | Loic Bistuer <loic.bistuer@gmail.com> | 2015-01-10 00:30:48 +0700 |
| commit | 8f4877c89d0f28e289399fbb46357623a49e7eb0 (patch) | |
| tree | 928a44b6cdef3f685f80f350af554e1252e9b136 /docs/topics/db | |
| parent | 665e0aa6ec80a48492033a3b2b4ffdfaae3c78eb (diff) | |
Fixed #22583 -- Allowed RunPython and RunSQL to provide hints to the db router.
Thanks Markus Holtermann and Tim Graham for the review.
Diffstat (limited to 'docs/topics/db')
| -rw-r--r-- | docs/topics/db/multi-db.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/db/multi-db.txt b/docs/topics/db/multi-db.txt index 7d4f2465c9..76df8610e3 100644 --- a/docs/topics/db/multi-db.txt +++ b/docs/topics/db/multi-db.txt @@ -150,7 +150,7 @@ A database Router is a class that provides up to four methods: used by foreign key and many to many operations to determine if a relation should be allowed between two objects. -.. method:: allow_migrate(db, model) +.. method:: allow_migrate(db, model, **hints) Determine if the ``model`` should have tables/indexes created in the database with alias ``db``. Return True if the model should be @@ -293,7 +293,7 @@ send queries for the ``auth`` app to ``auth_db``:: return True return None - def allow_migrate(self, db, model): + def allow_migrate(self, db, model, **hints): """ Make sure the auth app only appears in the 'auth_db' database. @@ -333,7 +333,7 @@ from:: return True return None - def allow_migrate(self, db, model): + def allow_migrate(self, db, model, **hints): """ All non-auth models end up in this pool. """ |
