Move letter length check to utils repo so template-preview can use it, too

Update requirements
This commit is contained in:
Pea Tyczynska
2019-10-09 14:56:18 +01:00
parent c524b0bbf5
commit 2ed1e382b4
8 changed files with 20 additions and 85 deletions

View File

@@ -43,7 +43,6 @@ FAILURE_STATUSES = ['failed', 'temporary-failure', 'permanent-failure',
'technical-failure', 'virus-scan-failed', 'validation-failed']
REQUESTED_STATUSES = SENDING_STATUSES + DELIVERED_STATUSES + FAILURE_STATUSES
LETTER_MAX_PAGES = 10
with open('{}/email_domains.txt'.format(
os.path.dirname(os.path.realpath(__file__))
@@ -545,12 +544,6 @@ def get_letter_printing_statement(status, created_at):
return 'Printed on {} at 5:30pm'.format(printed_date)
def is_letter_too_long(page_count):
if not page_count:
return False
return page_count > LETTER_MAX_PAGES
class PermanentRedirect(RequestRedirect):
"""
In Werkzeug 0.15.0 the status code for RequestRedirect changed from 301 to 308.