remove broadcast-related code, except migrations

This commit is contained in:
stvnrlly
2022-10-04 15:28:27 +00:00
parent 36ce2f7830
commit 57f4df8ed1
58 changed files with 14 additions and 6600 deletions

View File

@@ -3,7 +3,6 @@ from datetime import datetime, timedelta
import pytz
from flask import url_for
from notifications_utils.template import (
BroadcastMessageTemplate,
HTMLEmailTemplate,
LetterPrintTemplate,
SMSMessageTemplate,
@@ -48,12 +47,11 @@ def url_with_token(data, url, config, base_url=None):
def get_template_instance(template, values):
from app.models import BROADCAST_TYPE, EMAIL_TYPE, LETTER_TYPE, SMS_TYPE
from app.models import EMAIL_TYPE, LETTER_TYPE, SMS_TYPE
return {
SMS_TYPE: SMSMessageTemplate,
EMAIL_TYPE: HTMLEmailTemplate,
LETTER_TYPE: LetterPrintTemplate,
BROADCAST_TYPE: BroadcastMessageTemplate,
}[template['template_type']](template, values)
@@ -90,7 +88,6 @@ def get_london_month_from_utc_column(column):
def get_public_notify_type_text(notify_type, plural=False):
from app.models import (
BROADCAST_TYPE,
PRECOMPILED_LETTER,
SMS_TYPE,
UPLOAD_DOCUMENT,
@@ -102,9 +99,7 @@ def get_public_notify_type_text(notify_type, plural=False):
notify_type_text = 'document'
elif notify_type == PRECOMPILED_LETTER:
notify_type_text = 'precompiled letter'
elif notify_type == BROADCAST_TYPE:
notify_type_text = 'broadcast message'
return '{}{}'.format(notify_type_text, 's' if plural else '')