From 14116bc53eec6cd35447fad72b0fdaae84900d7d Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 25 Jan 2010 12:23:30 +0000 Subject: Fixed #12672 -- Added the ability to configure which applications are available on which database. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12290 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'django/db') diff --git a/django/db/utils.py b/django/db/utils.py index a876974c51..1b3218e34c 100644 --- a/django/db/utils.py +++ b/django/db/utils.py @@ -121,3 +121,10 @@ class ConnectionRouter(object): if allow is not None: return allow return obj1._state.db == obj2._state.db + + def allow_syncdb(self, db, model): + for router in self.routers: + allow = router.allow_syncdb(db, model) + if allow is not None: + return allow + return True -- cgit v1.3