mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Extract formatters into their own module
We have lots of functions for converting various types of data into strings to be displayed to the user somewhere. This commit collects all these functions into their own module, rather than having them cluttering up `app/__init__.py` or buried amongst various other things that have ended up in `app/utils.py`.
This commit is contained in:
@@ -7,13 +7,13 @@ from werkzeug.utils import cached_property
|
||||
|
||||
from app.broadcast_areas import broadcast_area_libraries
|
||||
from app.broadcast_areas.polygons import Polygons
|
||||
from app.formatters import round_to_significant_figures
|
||||
from app.models import JSONModel, ModelList
|
||||
from app.models.user import User
|
||||
from app.notify_client.broadcast_message_api_client import (
|
||||
broadcast_message_api_client,
|
||||
)
|
||||
from app.notify_client.service_api_client import service_api_client
|
||||
from app.utils import round_to_significant_figures
|
||||
|
||||
|
||||
class BroadcastMessage(JSONModel):
|
||||
|
||||
@@ -2,9 +2,9 @@ from abc import ABC, abstractmethod
|
||||
|
||||
from notifications_utils.formatters import formatted_list
|
||||
|
||||
from app.formatters import format_thousands
|
||||
from app.models import ModelList
|
||||
from app.notify_client.service_api_client import service_api_client
|
||||
from app.utils import format_thousands
|
||||
|
||||
|
||||
class Event(ABC):
|
||||
|
||||
Reference in New Issue
Block a user