mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 08:59:49 -04:00
Add a redirect for the letter specification
This way we have a URL we can give people that always points to the latest version of the spec. And it makes our code more Flask-idiomatic to be using `url_for` to be generating a URL, rather than passing around a constant.
This commit is contained in:
@@ -17,11 +17,7 @@ from app.main import main
|
||||
from app.main.forms import FieldWithNoneOption, SearchByNameForm
|
||||
from app.main.views.feedback import QUESTION_TICKET_TYPE
|
||||
from app.main.views.sub_navigation_dictionaries import features_nav, pricing_nav
|
||||
from app.utils import (
|
||||
LETTER_SPECIFICATION_URL,
|
||||
get_logo_cdn_domain,
|
||||
user_is_logged_in,
|
||||
)
|
||||
from app.utils import get_logo_cdn_domain, user_is_logged_in
|
||||
|
||||
|
||||
@main.route('/')
|
||||
@@ -273,7 +269,6 @@ def features_sms():
|
||||
def features_letters():
|
||||
return render_template(
|
||||
'views/features/letters.html',
|
||||
letter_specification_url=LETTER_SPECIFICATION_URL,
|
||||
navigation_links=features_nav()
|
||||
)
|
||||
|
||||
@@ -348,3 +343,11 @@ def old_page_redirects():
|
||||
'main.old_integration_testing': 'main.integration_testing',
|
||||
}
|
||||
return redirect(url_for(redirects[request.endpoint]), code=301)
|
||||
|
||||
|
||||
@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'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user