mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-12 00:02:36 -05:00
remove broadcast-related code, except migrations
This commit is contained in:
@@ -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 '')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user