Skip to content

Commit

Permalink
input.views: Cast translated string to str so str concatenation works
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Feb 24, 2021
1 parent b3a416e commit 2318b9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cove/input/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ def data_input(request, form_classes=default_form_classes, text_file_name='test.
'sub_title': _("Sorry we got a ConnectionError whilst trying to download that file"),
'link': 'index',
'link_text': _('Try Again'),
'msg': str(err) + '\n\n' + _('Common reasons for this error include supplying a local '
'development url that our servers can\'t access, or misconfigured SSL certificates.')
'msg': str(err) + '\n\n' + str(_('Common reasons for this error include supplying a local '
'development url that our servers can\'t access, or misconfigured SSL certificates.'))
})
except requests.HTTPError as err:
return render(request, 'error.html', context={
'sub_title': _("Sorry we got a HTTP Error whilst trying to download that file"),
'link': 'index',
'link_text': _('Try Again'),
'msg': str(err) + '\n\n' + _('If you can access the file through a browser then the problem '
'may be related to permissions, or you may be blocking certain user agents.')
'msg': str(err) + '\n\n' + str(_('If you can access the file through a browser then the problem '
'may be related to permissions, or you may be blocking certain user agents.'))
})
elif form_name == 'text_form':
data.original_file.save(text_file_name, ContentFile(form['paste'].value()))
Expand Down

0 comments on commit 2318b9d

Please sign in to comment.