Split models to prevent circular imports

This commit is the first step to disentangling the models from the API
clients. With the models in the same folder as the API clients it makes
it hard to import the API clients within the model without getting a
circular import.

After this commit the user API clients still has this problem, but at
least the service API client doesn’t.
This commit is contained in:
Chris Hill-Scott
2018-10-26 15:58:44 +01:00
parent 9e798506c5
commit e04b2b5631
21 changed files with 188 additions and 190 deletions

View File

@@ -41,7 +41,8 @@ from werkzeug.local import LocalProxy
from app import proxy_fix
from app.config import configs
from app.asset_fingerprinter import asset_fingerprinter
from app.notify_client.models import Service
from app.models.service import Service
from app.models.user import AnonymousUser
from app.navigation import (
CaseworkNavigation,
HeaderNavigation,
@@ -59,7 +60,6 @@ from app.notify_client.user_api_client import user_api_client
from app.notify_client.events_api_client import events_api_client
from app.notify_client.provider_client import provider_client
from app.notify_client.email_branding_client import email_branding_client
from app.notify_client.models import AnonymousUser
from app.notify_client.organisations_api_client import organisations_client
from app.notify_client.org_invite_api_client import org_invite_api_client
from app.notify_client.letter_jobs_client import letter_jobs_client