From 72fa458f6ec3696efe9f4c889e4d6158627c0db7 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 29 Nov 2023 17:26:54 -0500 Subject: [PATCH] Remove separate database for doorcontrol app --- cmsmanage/settings/base.py | 1 - doorcontrol/routers.py | 26 -------------------------- 2 files changed, 27 deletions(-) delete mode 100644 doorcontrol/routers.py diff --git a/cmsmanage/settings/base.py b/cmsmanage/settings/base.py index c4a8bbd..785b8a3 100644 --- a/cmsmanage/settings/base.py +++ b/cmsmanage/settings/base.py @@ -79,7 +79,6 @@ WSGI_APPLICATION = "cmsmanage.wsgi.application" DATABASE_ROUTERS = [ "membershipworks.routers.MembershipWorksRouter", - "doorcontrol.routers.DoorControlRouter", ] # Default URL to redirect to after authentication diff --git a/doorcontrol/routers.py b/doorcontrol/routers.py deleted file mode 100644 index dc7ccdc..0000000 --- a/doorcontrol/routers.py +++ /dev/null @@ -1,26 +0,0 @@ -class DoorControlRouter: - app_label = "doorcontrol" - db = "doors" - - def db_for_read(self, model, **hints): - if model._meta.app_label == self.app_label: - return self.db - return None - - def db_for_write(self, model, **hints): - if model._meta.app_label == self.app_label: - return self.db - return None - - def allow_migrate(self, db, app_label, model_name=None, **hints): - if app_label == self.app_label: - return db == self.db - return None - - def allow_relation(self, obj1, obj2, **hints): - if ( - obj1._meta.app_label == self.app_label - or obj2._meta.app_label == self.app_label - ): - return True - return None