Merge pull request #1395 from alphagov/pricing-update

Update pricing page with letters and international
This commit is contained in:
Chris Hill-Scott
2017-07-31 11:38:04 +01:00
committed by GitHub
2 changed files with 122 additions and 13 deletions

View File

@@ -1,9 +1,11 @@
from flask import (render_template, url_for, redirect, request, abort)
from app.main import main
from app import convert_to_boolean
from app.main.forms import SearchTemplatesForm
from flask_login import (login_required, current_user)
from notifications_utils.template import HTMLEmailTemplate
from notifications_utils.international_billing_rates import INTERNATIONAL_BILLING_RATES
@main.route('/')
@@ -31,7 +33,15 @@ def trial_mode():
@main.route('/pricing')
def pricing():
return render_template('views/pricing.html', sms_rate=0.0158)
return render_template(
'views/pricing.html',
sms_rate=0.0158,
international_sms_rates=sorted([
(cc, country['names'], country['billable_units'])
for cc, country in INTERNATIONAL_BILLING_RATES.items()
], key=lambda x: x[0]),
search_form=SearchTemplatesForm(),
)
@main.route('/delivery-and-failure')