2018-08-03 12:43:35 +01:00
|
|
|
|
from flask import (
|
|
|
|
|
|
abort,
|
|
|
|
|
|
make_response,
|
|
|
|
|
|
redirect,
|
|
|
|
|
|
render_template,
|
|
|
|
|
|
request,
|
|
|
|
|
|
url_for,
|
|
|
|
|
|
)
|
2019-07-01 15:22:08 +01:00
|
|
|
|
from flask_login import current_user
|
2018-02-20 11:22:17 +00:00
|
|
|
|
from notifications_utils.international_billing_rates import (
|
|
|
|
|
|
INTERNATIONAL_BILLING_RATES,
|
|
|
|
|
|
)
|
2019-02-15 14:47:39 +00:00
|
|
|
|
from notifications_utils.template import HTMLEmailTemplate, LetterImageTemplate
|
2016-07-04 16:25:20 +01:00
|
|
|
|
|
2019-04-10 17:20:51 +01:00
|
|
|
|
from app import email_branding_client, letter_branding_client, status_api_client
|
2018-02-20 11:22:17 +00:00
|
|
|
|
from app.main import main
|
2019-02-06 17:32:13 +00:00
|
|
|
|
from app.main.forms import FieldWithNoneOption, SearchByNameForm
|
2020-01-24 15:57:29 +00:00
|
|
|
|
from app.main.views.sub_navigation_dictionaries import (
|
|
|
|
|
|
features_nav,
|
|
|
|
|
|
pricing_nav,
|
|
|
|
|
|
using_notify_nav,
|
|
|
|
|
|
)
|
2020-03-24 15:36:39 +00:00
|
|
|
|
from app.models.feedback import QUESTION_TICKET_TYPE
|
2020-05-26 17:45:55 +01:00
|
|
|
|
from app.utils import get_logo_cdn_domain, hide_from_search_engines
|
2017-11-28 11:56:30 +00:00
|
|
|
|
|
2015-11-20 16:22:44 +00:00
|
|
|
|
|
2015-11-25 16:21:28 +00:00
|
|
|
|
@main.route('/')
|
2015-11-20 16:22:44 +00:00
|
|
|
|
def index():
|
2019-04-10 17:20:51 +01:00
|
|
|
|
|
2016-05-04 13:01:55 +01:00
|
|
|
|
if current_user and current_user.is_authenticated:
|
2018-03-08 16:51:53 +00:00
|
|
|
|
return redirect(url_for('main.choose_account'))
|
2019-04-10 17:20:51 +01:00
|
|
|
|
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/signedout.html',
|
|
|
|
|
|
counts=status_api_client.get_count_of_live_services_and_organisations(),
|
|
|
|
|
|
)
|
2015-11-23 16:07:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
2018-03-08 17:49:08 +00:00
|
|
|
|
@main.route('/error/<int:status_code>')
|
|
|
|
|
|
def error(status_code):
|
2018-03-09 12:28:55 +00:00
|
|
|
|
if status_code >= 500:
|
|
|
|
|
|
abort(404)
|
2018-03-08 17:49:08 +00:00
|
|
|
|
abort(status_code)
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-16 11:01:19 +00:00
|
|
|
|
@main.route('/cookies')
|
|
|
|
|
|
def cookies():
|
|
|
|
|
|
return render_template('views/cookies.html')
|
2016-03-17 13:44:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
2018-05-23 14:35:26 +01:00
|
|
|
|
@main.route('/privacy')
|
|
|
|
|
|
def privacy():
|
|
|
|
|
|
return render_template('views/privacy.html')
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 15:22:30 +01:00
|
|
|
|
@main.route('/pricing')
|
|
|
|
|
|
def pricing():
|
2017-07-28 14:28:25 +01:00
|
|
|
|
return render_template(
|
2019-06-04 10:44:23 +01:00
|
|
|
|
'views/pricing/index.html',
|
2017-07-28 14:28:25 +01:00
|
|
|
|
sms_rate=0.0158,
|
2017-07-28 14:58:47 +01:00
|
|
|
|
international_sms_rates=sorted([
|
|
|
|
|
|
(cc, country['names'], country['billable_units'])
|
|
|
|
|
|
for cc, country in INTERNATIONAL_BILLING_RATES.items()
|
2017-07-28 15:07:08 +01:00
|
|
|
|
], key=lambda x: x[0]),
|
2019-02-06 17:32:13 +00:00
|
|
|
|
search_form=SearchByNameForm(),
|
2019-06-04 10:48:23 +01:00
|
|
|
|
navigation_links=pricing_nav(),
|
2017-07-28 14:28:25 +01:00
|
|
|
|
)
|
2016-03-21 14:47:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
2019-06-04 10:43:15 +01:00
|
|
|
|
@main.route('/pricing/how-to-pay')
|
|
|
|
|
|
def how_to_pay():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/pricing/how-to-pay.html',
|
2019-06-04 10:48:23 +01:00
|
|
|
|
support_link=url_for('main.feedback', ticket_type=QUESTION_TICKET_TYPE),
|
|
|
|
|
|
navigation_links=pricing_nav(),
|
2019-06-04 10:43:15 +01:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-09 16:18:13 +01:00
|
|
|
|
@main.route('/delivery-and-failure')
|
2020-01-24 15:57:29 +00:00
|
|
|
|
@main.route('/features/messages-status')
|
2016-05-09 16:18:13 +01:00
|
|
|
|
def delivery_and_failure():
|
2019-04-11 12:00:37 +01:00
|
|
|
|
return redirect(url_for('.message_status'), 301)
|
2016-05-09 16:18:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
2016-06-08 15:48:03 +01:00
|
|
|
|
@main.route('/design-patterns-content-guidance')
|
|
|
|
|
|
def design_content():
|
2019-09-05 16:24:40 +01:00
|
|
|
|
return redirect('https://www.gov.uk/service-manual/design/sending-emails-and-text-messages', 301)
|
2016-06-08 15:48:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 16:25:20 +01:00
|
|
|
|
@main.route('/_email')
|
|
|
|
|
|
def email_template():
|
2018-08-29 11:38:40 +01:00
|
|
|
|
branding_type = 'govuk'
|
2018-12-05 10:30:44 +00:00
|
|
|
|
branding_style = request.args.get('branding_style', None)
|
2018-08-03 12:43:35 +01:00
|
|
|
|
|
2018-12-05 10:30:44 +00:00
|
|
|
|
if branding_style == FieldWithNoneOption.NONE_OPTION_VALUE:
|
|
|
|
|
|
branding_style = None
|
|
|
|
|
|
|
|
|
|
|
|
if branding_style is not None:
|
2018-08-29 11:38:40 +01:00
|
|
|
|
email_branding = email_branding_client.get_email_branding(branding_style)['email_branding']
|
|
|
|
|
|
branding_type = email_branding['brand_type']
|
|
|
|
|
|
|
|
|
|
|
|
if branding_type == 'govuk':
|
2019-06-25 16:56:45 +01:00
|
|
|
|
brand_text = None
|
2018-08-03 12:43:35 +01:00
|
|
|
|
brand_colour = None
|
|
|
|
|
|
brand_logo = None
|
|
|
|
|
|
govuk_banner = True
|
|
|
|
|
|
brand_banner = False
|
2019-06-25 16:56:45 +01:00
|
|
|
|
brand_name = None
|
2018-08-03 12:43:35 +01:00
|
|
|
|
else:
|
2018-08-23 17:44:34 +01:00
|
|
|
|
colour = email_branding['colour']
|
2019-06-25 16:56:45 +01:00
|
|
|
|
brand_text = email_branding['text']
|
2018-08-22 12:56:08 +01:00
|
|
|
|
brand_colour = colour
|
2018-11-29 11:41:13 +00:00
|
|
|
|
brand_logo = ('https://{}/{}'.format(get_logo_cdn_domain(), email_branding['logo'])
|
2018-10-10 16:28:06 +01:00
|
|
|
|
if email_branding['logo'] else None)
|
2018-08-03 12:43:35 +01:00
|
|
|
|
govuk_banner = branding_type in ['govuk', 'both']
|
|
|
|
|
|
brand_banner = branding_type == 'org_banner'
|
2019-06-25 16:56:45 +01:00
|
|
|
|
brand_name = email_branding['name']
|
2018-08-03 12:43:35 +01:00
|
|
|
|
|
|
|
|
|
|
template = {
|
2020-04-15 17:58:57 +01:00
|
|
|
|
'template_type': 'email',
|
2018-08-03 12:43:35 +01:00
|
|
|
|
'subject': 'foo',
|
|
|
|
|
|
'content': (
|
|
|
|
|
|
'Lorem Ipsum is simply dummy text of the printing and typesetting '
|
|
|
|
|
|
'industry.\n\nLorem Ipsum has been the industry’s standard dummy '
|
|
|
|
|
|
'text ever since the 1500s, when an unknown printer took a galley '
|
|
|
|
|
|
'of type and scrambled it to make a type specimen book. '
|
|
|
|
|
|
'\n\n'
|
|
|
|
|
|
'# History'
|
|
|
|
|
|
'\n\n'
|
|
|
|
|
|
'It has '
|
|
|
|
|
|
'survived not only'
|
|
|
|
|
|
'\n\n'
|
|
|
|
|
|
'* five centuries'
|
|
|
|
|
|
'\n'
|
|
|
|
|
|
'* but also the leap into electronic typesetting'
|
|
|
|
|
|
'\n\n'
|
|
|
|
|
|
'It was '
|
|
|
|
|
|
'popularised in the 1960s with the release of Letraset sheets '
|
|
|
|
|
|
'containing Lorem Ipsum passages, and more recently with desktop '
|
|
|
|
|
|
'publishing software like Aldus PageMaker including versions of '
|
|
|
|
|
|
'Lorem Ipsum.'
|
|
|
|
|
|
'\n\n'
|
|
|
|
|
|
'^ It is a long established fact that a reader will be distracted '
|
|
|
|
|
|
'by the readable content of a page when looking at its layout.'
|
|
|
|
|
|
'\n\n'
|
|
|
|
|
|
'The point of using Lorem Ipsum is that it has a more-or-less '
|
|
|
|
|
|
'normal distribution of letters, as opposed to using ‘Content '
|
|
|
|
|
|
'here, content here’, making it look like readable English.'
|
|
|
|
|
|
'\n\n\n'
|
|
|
|
|
|
'1. One'
|
|
|
|
|
|
'\n'
|
|
|
|
|
|
'2. Two'
|
|
|
|
|
|
'\n'
|
|
|
|
|
|
'10. Three'
|
|
|
|
|
|
'\n\n'
|
|
|
|
|
|
'This is an example of an email sent using GOV.UK Notify.'
|
|
|
|
|
|
'\n\n'
|
|
|
|
|
|
'https://www.notifications.service.gov.uk'
|
|
|
|
|
|
)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if not bool(request.args):
|
|
|
|
|
|
resp = make_response(str(HTMLEmailTemplate(template)))
|
|
|
|
|
|
else:
|
|
|
|
|
|
resp = make_response(str(HTMLEmailTemplate(
|
|
|
|
|
|
template,
|
|
|
|
|
|
govuk_banner=govuk_banner,
|
2019-06-25 16:56:45 +01:00
|
|
|
|
brand_text=brand_text,
|
2018-08-03 12:43:35 +01:00
|
|
|
|
brand_colour=brand_colour,
|
|
|
|
|
|
brand_logo=brand_logo,
|
|
|
|
|
|
brand_banner=brand_banner,
|
2019-06-25 16:56:45 +01:00
|
|
|
|
brand_name=brand_name,
|
2018-08-03 12:43:35 +01:00
|
|
|
|
)))
|
|
|
|
|
|
|
|
|
|
|
|
resp.headers['X-Frame-Options'] = 'SAMEORIGIN'
|
|
|
|
|
|
return resp
|
2016-07-04 16:25:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
2019-02-15 14:47:39 +00:00
|
|
|
|
@main.route('/_letter')
|
|
|
|
|
|
def letter_template():
|
|
|
|
|
|
branding_style = request.args.get('branding_style')
|
|
|
|
|
|
|
|
|
|
|
|
if branding_style == FieldWithNoneOption.NONE_OPTION_VALUE:
|
|
|
|
|
|
branding_style = None
|
|
|
|
|
|
|
|
|
|
|
|
if branding_style:
|
|
|
|
|
|
filename = letter_branding_client.get_letter_branding(branding_style)['filename']
|
|
|
|
|
|
else:
|
|
|
|
|
|
filename = 'no-branding'
|
|
|
|
|
|
|
2020-04-15 17:58:57 +01:00
|
|
|
|
template = {'subject': '', 'content': '', 'template_type': 'letter'}
|
2019-11-29 11:40:49 +00:00
|
|
|
|
image_url = url_for('no_cookie.letter_branding_preview_image', filename=filename)
|
2019-02-15 14:47:39 +00:00
|
|
|
|
|
|
|
|
|
|
template_image = str(LetterImageTemplate(
|
|
|
|
|
|
template,
|
|
|
|
|
|
image_url=image_url,
|
|
|
|
|
|
page_count=1,
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
resp = make_response(
|
|
|
|
|
|
render_template('views/service-settings/letter-preview.html', template=template_image)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
resp.headers['X-Frame-Options'] = 'SAMEORIGIN'
|
|
|
|
|
|
return resp
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-15 10:48:31 +01:00
|
|
|
|
@main.route('/documentation')
|
|
|
|
|
|
def documentation():
|
2020-01-24 15:57:29 +00:00
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/documentation.html',
|
|
|
|
|
|
navigation_links=using_notify_nav(),
|
|
|
|
|
|
)
|
2017-01-27 17:32:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
2017-11-28 11:56:30 +00:00
|
|
|
|
@main.route('/integration-testing')
|
2017-01-27 17:32:20 +00:00
|
|
|
|
def integration_testing():
|
2018-11-06 17:24:30 +00:00
|
|
|
|
return render_template('views/integration-testing.html'), 410
|
2017-03-23 15:03:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
2017-11-28 11:56:30 +00:00
|
|
|
|
@main.route('/callbacks')
|
|
|
|
|
|
def callbacks():
|
2019-09-05 16:24:40 +01:00
|
|
|
|
return redirect(url_for('main.documentation'), 301)
|
2017-11-28 11:56:30 +00:00
|
|
|
|
|
2017-06-14 16:05:20 +01:00
|
|
|
|
|
2017-11-29 13:59:01 +00:00
|
|
|
|
# --- Features page set --- #
|
2017-06-14 16:05:20 +01:00
|
|
|
|
|
|
|
|
|
|
@main.route('/features')
|
2017-06-14 16:53:16 +01:00
|
|
|
|
def features():
|
2017-11-28 11:56:30 +00:00
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/features.html',
|
|
|
|
|
|
navigation_links=features_nav()
|
|
|
|
|
|
)
|
2017-08-30 15:22:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
2017-11-28 11:56:30 +00:00
|
|
|
|
@main.route('/features/roadmap', endpoint='roadmap')
|
|
|
|
|
|
def roadmap():
|
2017-11-29 13:59:01 +00:00
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/roadmap.html',
|
|
|
|
|
|
navigation_links=features_nav()
|
|
|
|
|
|
)
|
2017-11-28 11:56:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
2019-04-09 15:16:50 +01:00
|
|
|
|
@main.route('/features/email')
|
2020-05-26 17:45:55 +01:00
|
|
|
|
@hide_from_search_engines
|
2019-04-09 15:16:50 +01:00
|
|
|
|
def features_email():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/features/emails.html',
|
|
|
|
|
|
navigation_links=features_nav()
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/features/sms')
|
|
|
|
|
|
def features_sms():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/features/text-messages.html',
|
|
|
|
|
|
navigation_links=features_nav()
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/features/letters')
|
|
|
|
|
|
def features_letters():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/features/letters.html',
|
|
|
|
|
|
navigation_links=features_nav()
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-28 11:56:30 +00:00
|
|
|
|
@main.route('/features/security', endpoint='security')
|
|
|
|
|
|
def security():
|
2017-11-29 13:59:01 +00:00
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/security.html',
|
|
|
|
|
|
navigation_links=features_nav()
|
|
|
|
|
|
)
|
2017-11-28 11:56:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/features/terms', endpoint='terms')
|
|
|
|
|
|
def terms():
|
2017-11-29 13:59:01 +00:00
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/terms-of-use.html',
|
2018-03-08 12:12:18 +00:00
|
|
|
|
navigation_links=features_nav(),
|
2017-11-29 13:59:01 +00:00
|
|
|
|
)
|
2017-11-28 11:56:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/features/using-notify')
|
2017-08-30 15:22:26 +01:00
|
|
|
|
def using_notify():
|
2017-11-29 13:59:01 +00:00
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/using-notify.html',
|
|
|
|
|
|
navigation_links=features_nav()
|
2019-04-09 15:33:28 +01:00
|
|
|
|
), 410
|
2017-11-29 13:59:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
2020-01-24 15:57:29 +00:00
|
|
|
|
@main.route('/using-notify/delivery-status')
|
2019-04-09 15:24:07 +01:00
|
|
|
|
def message_status():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/message-status.html',
|
2020-01-24 15:57:29 +00:00
|
|
|
|
navigation_links=using_notify_nav(),
|
2019-04-09 15:24:07 +01:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-17 16:15:28 +01:00
|
|
|
|
@main.route('/features/get-started')
|
2020-01-24 15:57:29 +00:00
|
|
|
|
def get_started_old():
|
|
|
|
|
|
return redirect(url_for('.get_started'), 301)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/using-notify/get-started')
|
2019-10-17 16:15:28 +01:00
|
|
|
|
def get_started():
|
|
|
|
|
|
return render_template(
|
2020-01-24 15:57:29 +00:00
|
|
|
|
'views/get-started.html',
|
|
|
|
|
|
navigation_links=using_notify_nav(),
|
2019-10-17 16:15:28 +01:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-21 11:17:44 +01:00
|
|
|
|
@main.route('/using-notify/who-its-for')
|
|
|
|
|
|
def who_its_for():
|
|
|
|
|
|
return redirect(url_for('.who_can_use_notify'), 301)
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-20 16:09:25 +01:00
|
|
|
|
@main.route('/using-notify/who-can-use-notify')
|
2020-05-20 16:06:57 +01:00
|
|
|
|
def who_can_use_notify():
|
2020-03-25 11:52:30 +00:00
|
|
|
|
return render_template(
|
2020-05-20 16:09:25 +01:00
|
|
|
|
'views/guidance/who-can-use-notify.html',
|
2020-05-21 12:05:03 +01:00
|
|
|
|
navigation_links=features_nav(),
|
2020-03-25 11:52:30 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-09 15:27:33 +01:00
|
|
|
|
@main.route('/trial-mode')
|
2020-01-24 15:57:29 +00:00
|
|
|
|
@main.route('/features/trial-mode')
|
2019-04-09 15:27:33 +01:00
|
|
|
|
def trial_mode():
|
|
|
|
|
|
return redirect(url_for('.trial_mode_new'), 301)
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-24 15:57:29 +00:00
|
|
|
|
@main.route('/using-notify/trial-mode')
|
2019-04-09 15:27:33 +01:00
|
|
|
|
def trial_mode_new():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/trial-mode.html',
|
2020-01-24 15:57:29 +00:00
|
|
|
|
navigation_links=using_notify_nav(),
|
2019-04-09 15:27:33 +01:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-24 15:57:29 +00:00
|
|
|
|
@main.route('/using-notify/guidance')
|
|
|
|
|
|
def guidance_index():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/guidance/index.html',
|
|
|
|
|
|
navigation_links=using_notify_nav(),
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/using-notify/guidance/branding-and-customisation')
|
|
|
|
|
|
def branding_and_customisation():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/guidance/branding-and-customisation.html',
|
|
|
|
|
|
navigation_links=using_notify_nav(),
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/using-notify/guidance/create-and-send-messages')
|
2020-01-27 11:46:09 +00:00
|
|
|
|
def create_and_send_messages():
|
2020-01-24 15:57:29 +00:00
|
|
|
|
return render_template(
|
2020-01-27 11:46:09 +00:00
|
|
|
|
'views/guidance/create-and-send-messages.html',
|
2020-01-24 15:57:29 +00:00
|
|
|
|
navigation_links=using_notify_nav(),
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/using-notify/guidance/edit-and-format-messages')
|
|
|
|
|
|
def edit_and_format_messages():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/guidance/edit-and-format-messages.html',
|
|
|
|
|
|
navigation_links=using_notify_nav(),
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/using-notify/guidance/send-files-by-email')
|
|
|
|
|
|
def send_files_by_email():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/guidance/send-files-by-email.html',
|
|
|
|
|
|
navigation_links=using_notify_nav(),
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/using-notify/guidance/upload-a-letter')
|
|
|
|
|
|
def upload_a_letter():
|
|
|
|
|
|
return render_template(
|
|
|
|
|
|
'views/guidance/upload-a-letter.html',
|
|
|
|
|
|
navigation_links=using_notify_nav(),
|
|
|
|
|
|
)
|
2020-01-22 13:47:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
2017-11-29 13:59:01 +00:00
|
|
|
|
# --- Redirects --- #
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/roadmap', endpoint='old_roadmap')
|
|
|
|
|
|
@main.route('/terms', endpoint='old_terms')
|
|
|
|
|
|
@main.route('/information-security', endpoint='information_security')
|
|
|
|
|
|
@main.route('/using_notify', endpoint='old_using_notify')
|
|
|
|
|
|
@main.route('/information-risk-management', endpoint='information_risk_management')
|
|
|
|
|
|
@main.route('/integration_testing', endpoint='old_integration_testing')
|
|
|
|
|
|
def old_page_redirects():
|
|
|
|
|
|
redirects = {
|
|
|
|
|
|
'main.old_roadmap': 'main.roadmap',
|
|
|
|
|
|
'main.old_terms': 'main.terms',
|
|
|
|
|
|
'main.information_security': 'main.using_notify',
|
|
|
|
|
|
'main.old_using_notify': 'main.using_notify',
|
|
|
|
|
|
'main.information_risk_management': 'main.security',
|
|
|
|
|
|
'main.old_integration_testing': 'main.integration_testing',
|
|
|
|
|
|
}
|
|
|
|
|
|
return redirect(url_for(redirects[request.endpoint]), code=301)
|
2020-01-15 10:56:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/docs/notify-pdf-letter-spec-latest.pdf')
|
|
|
|
|
|
def letter_spec():
|
|
|
|
|
|
return redirect(
|
|
|
|
|
|
'https://docs.notifications.service.gov.uk'
|
|
|
|
|
|
'/documentation/images/notify-pdf-letter-spec-v2.4.pdf'
|
|
|
|
|
|
)
|