Add remaining endpoints for PDFs and PNGs

Right now we can show what a letter template looks like as a PDF or PNG.

This commit completes the work so this is also possible when:

- showing a template with the placeholders replaced
- showing any version of a template

Also removes dependency on `Exception().message`, which was deprecated
in Python 2.6. See
97f82d565f
for full details.
This commit is contained in:
Chris Hill-Scott
2016-12-20 14:38:34 +00:00
parent a159f351a8
commit 559433c5d2
8 changed files with 214 additions and 33 deletions

View File

@@ -96,7 +96,7 @@ class UKMobileNumber(TelField):
try:
validate_phone_number(self.data)
except InvalidPhoneError as e:
raise ValidationError(e.message)
raise ValidationError(str(e))
def mobile_number():