コード例 #1
0
 def __call__(self, form, field):
     if not Spreadsheet.can_handle(field.data.filename):
         raise ValidationError(
             "{} {}".format(
                 field.data.filename,
                 _("is not a spreadsheet that GC Notify can read"),
             )
         )
コード例 #2
0
 def __call__(self, form, field):
     if not Spreadsheet.can_handle(field.data.filename):
         raise ValidationError("{} isn’t a spreadsheet that Notify can read".format(field.data.filename))