Move broadcast model code into an explicit module

Previously this was hidden away in an anonymous __init__.py file.
I did think about splitting the models into individual files, like
we do with the top-level models for the app. Since the models are
only imported in one place - i.e. are all used together - it didn't
seem worth the hassle, so I've kept them in one file.
This commit is contained in:
Ben Thorner
2021-06-10 15:05:38 +01:00
parent e7713de4a5
commit fba8d09875
3 changed files with 5 additions and 2 deletions

View File

@@ -6,7 +6,10 @@ from notifications_utils.template import BroadcastPreviewTemplate
from orderedset import OrderedSet
from werkzeug.utils import cached_property
from app.broadcast_areas import CustomBroadcastAreas, broadcast_area_libraries
from app.broadcast_areas.models import (
CustomBroadcastAreas,
broadcast_area_libraries,
)
from app.formatters import round_to_significant_figures
from app.models import JSONModel, ModelList
from app.models.user import User

View File

@@ -3,7 +3,7 @@ from math import isclose
import pytest
from custom_polygons import BRISTOL, SKYE
from app.broadcast_areas import (
from app.broadcast_areas.models import (
BroadcastAreasRepository,
CustomBroadcastArea,
broadcast_area_libraries,