Bring in changes to template and CSV processing

Functional changes:
- adds the blue bar

Performance changes
- faster CSV processing

Depends on:

- [ ] https://github.com/alphagov/notifications-utils/pull/47
- [ ] https://github.com/alphagov/notifications-utils/pull/48

Also brings in some breaking changes, which do not affect utils (apart
from a weird import).
This commit is contained in:
Chris Hill-Scott
2016-07-05 16:21:31 +01:00
parent 3e6a59ad46
commit 824085ead8
3 changed files with 24 additions and 12 deletions

View File

@@ -240,7 +240,11 @@ def send_notification(notification_type):
if errors:
raise InvalidRequest(errors, status_code=400)
template_object = Template(template.__dict__, notification.get('personalisation', {}))
template_object = Template(
template.__dict__,
notification.get('personalisation', {}),
renderer=lambda content: content
)
if template_object.missing_data:
message = 'Missing personalisation: {}'.format(", ".join(template_object.missing_data))
errors = {'template': [message]}