mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 17:45:32 -04:00
Rather than making users contact us to get the agreement, we should just let them download it, when we know which version to send them. This commit adds two endpoints: - one to serve a page which links to the agreement - one to serve the agreement itself These pages are not linked to anywhere because the underlying files don’t exist yet. So I haven’t bothered putting real content on the page yet either. I imagine the deploy sequence will be: 1. Upload the files to the buckets in each environment 2. Deploy this code through each enviroment, checking the links work 3. Make another PR to start linking to the endpoints added by this commit
27 lines
674 B
Python
27 lines
674 B
Python
from flask import render_template, send_file
|
|
from flask_login import login_required
|
|
|
|
from app.main import main
|
|
from app.main.views.sub_navigation_dictionaries import features_nav
|
|
from app.main.s3_client import get_mou
|
|
from app.utils import AgreementInfo
|
|
|
|
|
|
|
|
@main.route('/agreement')
|
|
@login_required
|
|
def agreement():
|
|
return render_template(
|
|
'views/agreement.html',
|
|
crown_status=AgreementInfo.from_current_user().crown_status_or_404,
|
|
navigation_links=features_nav(),
|
|
)
|
|
|
|
|
|
@main.route('/agreement.pdf')
|
|
@login_required
|
|
def download_agreement():
|
|
return send_file(**get_mou(
|
|
AgreementInfo.from_current_user().crown_status_or_404
|
|
))
|