diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-01-25 12:23:30 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-01-25 12:23:30 +0000 |
| commit | 14116bc53eec6cd35447fad72b0fdaae84900d7d (patch) | |
| tree | cf18ef2c7c98e6b6e1ad672d983782291429a0cc /django/db/utils.py | |
| parent | 6755a039eb2739a2bdaac4cd9b333e8c83b75836 (diff) | |
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
Diffstat (limited to 'django/db/utils.py')
| -rw-r--r-- | django/db/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
