Don’t repeat the letter spec URL in the code

We change this URL fairly frequently because we bump the version number.
Let’s make it easier to change by only defining it once.
This commit is contained in:
Chris Hill-Scott
2020-01-10 17:13:08 +00:00
parent 72abd89fe0
commit a186d0eeff
5 changed files with 19 additions and 9 deletions

View File

@@ -17,7 +17,11 @@ 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 get_logo_cdn_domain, user_is_logged_in
from app.utils import (
LETTER_SPECIFICATION_URL,
get_logo_cdn_domain,
user_is_logged_in,
)
@main.route('/')
@@ -269,6 +273,7 @@ def features_sms():
def features_letters():
return render_template(
'views/features/letters.html',
letter_specification_url=LETTER_SPECIFICATION_URL,
navigation_links=features_nav()
)

View File

@@ -33,6 +33,7 @@ from app.s3_client.s3_letter_upload_client import (
)
from app.template_previews import TemplatePreview, sanitise_letter
from app.utils import (
LETTER_SPECIFICATION_URL,
generate_next_dict,
generate_previous_dict,
get_letter_validation_error,
@@ -65,6 +66,7 @@ def uploads(service_id):
prev_page=prev_page,
next_page=next_page,
scheduled_jobs='',
letter_specification_url=LETTER_SPECIFICATION_URL,
)