Use PDF link renderer to preview letters

Depends on and implements:
- [x] https://github.com/alphagov/notifications-utils/pull/84
- [ ] https://github.com/alphagov/notifications-utils/pull/86
This commit is contained in:
Chris Hill-Scott
2016-11-16 17:59:47 +00:00
parent 43296469d6
commit ae356fc741
3 changed files with 4 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ from flask_login import login_required, current_user
from notifications_utils.columns import Columns
from notifications_utils.template import Template
from notifications_utils.recipients import RecipientCSV, first_column_headings, validate_and_format_phone_number
from notifications_utils.renderers import EmailPreview, SMSPreview, LetterPDFLink
from app.main import main
from app.main.forms import CsvUploadForm, ChooseTimeForm, get_next_days_until, get_furthest_possible_scheduled_time

View File

@@ -8,7 +8,7 @@ import unicodedata
from flask import (abort, current_app, session, request, redirect, url_for)
from flask_login import current_user
from notifications_utils.renderers import SMSPreview, EmailPreview, LetterPreview
from notifications_utils.renderers import SMSPreview, EmailPreview, LetterPDFLink
import pyexcel
import pyexcel.ext.io
@@ -233,5 +233,5 @@ def get_renderer(template_type, service, show_recipient, expand_emails=False):
sender=service['sms_sender'],
show_recipient=show_recipient
),
'letter': LetterPreview(),
'letter': LetterPDFLink(service['id']),
}[template_type]

View File

@@ -22,4 +22,4 @@ wand==0.4.4
git+https://github.com/alphagov/notifications-python-client.git@3.0.1#egg=notifications-python-client==3.0.1
git+https://github.com/alphagov/notifications-utils.git@11.0.2#egg=notifications-utils==11.0.2
git+https://github.com/alphagov/notifications-utils.git@11.1.0#egg=notifications-utils==11.1.0