Display broadcasts without a template

At the moment the admin app expects all broadcasts to have a template,
and expects the content of the alert to come from the template.

This commit makes it so those pages can still get a `Template` instance,
but populated with content straight from the `content` field in the
database.
This commit is contained in:
Chris Hill-Scott
2021-01-15 15:11:43 +00:00
parent 74243a88fb
commit db4d9f886c
7 changed files with 86 additions and 21 deletions

View File

@@ -656,6 +656,7 @@ def broadcast_message_json(
cancelled_by_id=None,
areas=None,
content=None,
reference=None,
template_name='Example template',
):
return {
@@ -667,6 +668,7 @@ def broadcast_message_json(
'template_version': 123,
'template_name': template_name,
'content': content or 'This is a test',
'reference': reference,
'personalisation': {},
'areas': areas or [