2016-10-13 17:05:37 +01:00
|
|
|
|
from flask import (render_template, url_for, redirect, request, abort)
|
2015-11-20 16:33:11 +00:00
|
|
|
|
from app.main import main
|
2016-07-04 16:25:20 +01:00
|
|
|
|
from app import convert_to_boolean
|
2016-10-13 17:05:37 +01:00
|
|
|
|
from flask_login import (login_required, current_user)
|
2015-11-20 16:22:44 +00:00
|
|
|
|
|
2016-01-22 17:24:14 +00:00
|
|
|
|
|
2016-07-04 16:25:20 +01:00
|
|
|
|
from notifications_utils.renderers import HTMLEmail
|
|
|
|
|
|
|
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():
|
2016-05-04 13:01:55 +01:00
|
|
|
|
if current_user and current_user.is_authenticated:
|
2016-01-22 17:24:14 +00:00
|
|
|
|
return redirect(url_for('main.choose_service'))
|
2015-12-10 14:38:24 +00:00
|
|
|
|
return render_template('views/signedout.html')
|
2015-11-23 16:07:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
2015-11-25 16:21:28 +00:00
|
|
|
|
@main.route("/verify-mobile")
|
2016-01-11 16:03:41 +00:00
|
|
|
|
@login_required
|
2016-01-15 17:46:09 +00:00
|
|
|
|
def verify_mobile():
|
2015-12-10 14:38:24 +00:00
|
|
|
|
return render_template('views/verify-mobile.html')
|
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
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 15:22:30 +01:00
|
|
|
|
@main.route('/trial-mode')
|
|
|
|
|
|
def trial_mode():
|
2016-09-07 10:49:57 +01:00
|
|
|
|
return render_template('views/trial-mode.html')
|
2016-04-04 15:22:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@main.route('/pricing')
|
|
|
|
|
|
def pricing():
|
|
|
|
|
|
return render_template('views/pricing.html')
|
2016-03-21 14:47:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
2016-05-09 16:18:13 +01:00
|
|
|
|
@main.route('/delivery-and-failure')
|
|
|
|
|
|
def delivery_and_failure():
|
|
|
|
|
|
return render_template('views/delivery-and-failure.html')
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-08 15:48:03 +01:00
|
|
|
|
@main.route('/design-patterns-content-guidance')
|
|
|
|
|
|
def design_content():
|
|
|
|
|
|
return render_template('views/design-patterns-content-guidance.html')
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-08 15:47:45 +01:00
|
|
|
|
@main.route('/information-security')
|
|
|
|
|
|
def information_security():
|
|
|
|
|
|
return render_template('views/information-security.html')
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-08 15:20:55 +01:00
|
|
|
|
@main.route('/terms')
|
|
|
|
|
|
def terms():
|
|
|
|
|
|
return render_template('views/terms-of-use.html')
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-04 16:25:20 +01:00
|
|
|
|
@main.route('/_email')
|
|
|
|
|
|
def email_template():
|
|
|
|
|
|
return HTMLEmail(
|
|
|
|
|
|
govuk_banner=convert_to_boolean(request.args.get('govuk_banner', True))
|
|
|
|
|
|
)(
|
|
|
|
|
|
'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'
|
2016-09-19 09:37:55 +01:00
|
|
|
|
'\n\n'
|
|
|
|
|
|
'* five centuries'
|
2016-07-04 16:25:20 +01:00
|
|
|
|
'\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'
|
2016-09-19 09:37:55 +01:00
|
|
|
|
'1. One'
|
|
|
|
|
|
'\n'
|
|
|
|
|
|
'2. Two'
|
|
|
|
|
|
'\n'
|
|
|
|
|
|
'10. Three'
|
|
|
|
|
|
'\n\n'
|
2016-07-04 16:25:20 +01:00
|
|
|
|
'This is an example of an email sent using GOV.UK Notify.'
|
2016-09-19 09:37:55 +01:00
|
|
|
|
'\n\n'
|
|
|
|
|
|
'https://www.notifications.service.gov.uk'
|
2016-07-04 16:25:20 +01:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-15 10:48:31 +01:00
|
|
|
|
@main.route('/documentation')
|
|
|
|
|
|
def documentation():
|
2016-10-10 11:36:12 +01:00
|
|
|
|
abort(410)
|