mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 10:54:11 -04:00
Now that the new price is in effect, we don’t need to check the date to see which price should be displayed to the user.
53 lines
1.5 KiB
Python
53 lines
1.5 KiB
Python
from datetime import datetime
|
|
|
|
from flask import current_app, render_template
|
|
from flask_login import current_user
|
|
from notifications_utils.international_billing_rates import (
|
|
INTERNATIONAL_BILLING_RATES,
|
|
)
|
|
from notifications_utils.timezones import convert_utc_to_bst
|
|
|
|
from app.main import main
|
|
from app.main.forms import SearchByNameForm
|
|
from app.main.views.sub_navigation_dictionaries import pricing_nav
|
|
|
|
|
|
def get_current_sms_rate():
|
|
return '1.72'
|
|
|
|
|
|
@main.route('/pricing')
|
|
def pricing():
|
|
return render_template(
|
|
'views/pricing/index.html',
|
|
sms_rate=get_current_sms_rate(),
|
|
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=SearchByNameForm(),
|
|
navigation_links=pricing_nav(),
|
|
)
|
|
|
|
|
|
@main.route('/pricing/how-to-pay')
|
|
def how_to_pay():
|
|
return render_template(
|
|
'views/pricing/how-to-pay.html',
|
|
navigation_links=pricing_nav(),
|
|
)
|
|
|
|
|
|
@main.route('/pricing/billing-details')
|
|
def billing_details():
|
|
if current_user.is_authenticated:
|
|
return render_template(
|
|
'views/pricing/billing-details.html',
|
|
billing_details=current_app.config['NOTIFY_BILLING_DETAILS'],
|
|
navigation_links=pricing_nav(),
|
|
)
|
|
return render_template(
|
|
'views/pricing/billing-details-signed-out.html',
|
|
navigation_links=pricing_nav(),
|
|
)
|