mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Merge pull request #1923 from alphagov/remove-dvla
Remove anything to do with DVLA format letters
This commit is contained in:
@@ -2,21 +2,12 @@ from datetime import datetime, timedelta
|
||||
from string import ascii_uppercase
|
||||
|
||||
from dateutil.parser import parse
|
||||
from flask import (
|
||||
Response,
|
||||
abort,
|
||||
flash,
|
||||
redirect,
|
||||
render_template,
|
||||
request,
|
||||
url_for,
|
||||
)
|
||||
from flask import abort, flash, redirect, render_template, request, url_for
|
||||
from flask_login import current_user, login_required
|
||||
from markupsafe import Markup
|
||||
from notifications_python_client.errors import HTTPError
|
||||
from notifications_utils.formatters import nl2br
|
||||
from notifications_utils.recipients import first_column_headings
|
||||
from notifications_utils.template import LetterDVLATemplate
|
||||
|
||||
from app import current_service, service_api_client, template_statistics_client
|
||||
from app.main import main
|
||||
@@ -159,25 +150,6 @@ def choose_template(service_id, template_type='all'):
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/templates/<template_id>/as-dvla")
|
||||
@login_required
|
||||
@user_has_permissions(admin_override=True)
|
||||
def view_template_as_dvla_markup(service_id, template_id):
|
||||
|
||||
template = service_api_client.get_service_template(service_id, str(template_id))['data']
|
||||
|
||||
if template['template_type'] != 'letter':
|
||||
abort(404)
|
||||
|
||||
return Response(
|
||||
str(LetterDVLATemplate(
|
||||
template,
|
||||
notification_reference=1,
|
||||
)),
|
||||
mimetype='text/plain',
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/templates/<template_id>.<filetype>")
|
||||
@login_required
|
||||
@user_has_permissions('view_activity', admin_override=True)
|
||||
|
||||
Reference in New Issue
Block a user