diff options
Diffstat (limited to 'account/extra.py')
-rw-r--r-- | account/extra.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/account/extra.py b/account/extra.py index e478c6d..74c11e7 100644 --- a/account/extra.py +++ b/account/extra.py @@ -46,9 +46,9 @@ class ContentTypeRestrictedFileField(models.FileField): #raise forms.ValidationError(_("Invalid filetype."), code='invalid') if content_type in self.content_types: if file._size > self.max_upload_size: - raise forms.ValidationError(_('Please keep filesize under %s. Current filesize %s') % (filesizeformat(self.max_upload_size), filesizeformat(file._size)), code='invalid') + raise forms.ValidationError(_('Please keep filesize under %(maxsize)s. Current filesize %(filesize)s') % {'maxsize':filesizeformat(self.max_upload_size), 'filesize':filesizeformat(file._size)}, code='invalid') else: - raise forms.ValidationError(_("Invalid filetype."), code='invalid') + raise forms.ValidationError(_("Unsupported filetype"), code='invalid') except AttributeError: pass # |