From 25bdbdd05dd7da5d1abbbaa1e6e47df2256f6462 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Thu, 18 Jun 2015 20:06:25 -0300 Subject: [PATCH] Move legacy router to legacy app --- sapl/legacyrouter.py => legacy/router.py | 2 +- sapl/settings.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) rename sapl/legacyrouter.py => legacy/router.py (90%) diff --git a/sapl/legacyrouter.py b/legacy/router.py similarity index 90% rename from sapl/legacyrouter.py rename to legacy/router.py index bf747bb91..62ae6c4d2 100644 --- a/sapl/legacyrouter.py +++ b/legacy/router.py @@ -16,6 +16,6 @@ class LegacyRouter(object): return None def allow_migrate(self, db, model): - if model._meta.app_label == 'legacy': + if model._meta.app_label in ['legacy', 'pglegacy']: return False return None diff --git a/sapl/settings.py b/sapl/settings.py index d9fbf3fb6..321b6d2b6 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -41,6 +41,7 @@ INSTALLED_APPS = ( # legacy reversed model definitions (temporary) 'legacy', 'pglegacy', + 'base', # sapl modules @@ -110,7 +111,7 @@ DATABASES = { } } -DATABASE_ROUTERS = ['sapl.legacyrouter.LegacyRouter', ] +DATABASE_ROUTERS = ['legacy.router.LegacyRouter', ] # Internationalization # https://docs.djangoproject.com/en/1.8/topics/i18n/