From c8873bbba76bc52ab0766f98e8537b2fa66be71c Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 27 Jan 2010 07:56:53 +0000 Subject: 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 --- docs/topics/db/multi-db.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/topics/db/multi-db.txt b/docs/topics/db/multi-db.txt index f1d67bf977..73872e6b53 100644 --- a/docs/topics/db/multi-db.txt +++ b/docs/topics/db/multi-db.txt @@ -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 -- cgit v1.3