Made the database master router tolerant of router definitions that omit individual routing methods.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-01-27 07:56:53 +00:00
parent b0d218e9e2
commit c8873bbba7
3 changed files with 62 additions and 10 deletions

View file

@ -99,7 +99,7 @@ routing scheme.
Database routers
----------------
A database Router is a class that provides four methods:
A database Router is a class that provides up to four methods:
.. method:: db_for_read(model, **hints)
@ -141,6 +141,10 @@ A database Router is a class that provides four methods:
the router has no opinion. This method can be used to determine
the availability of a model on a given database.
A router doesn't have to provide *all* these methods - it omit one or
more of them. If one of the methods is omitted, Django will skip that
router when performing the relevant check.
.. _topics-db-multi-db-hints:
Hints