No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

validator.py 496B

1234567891011121314
  1. # This file is part of k4ever, a point-of-sale system
  2. # Contact............ <k4ever@lists.someserver.de>
  3. # Website............ http://k4ever.someserver.de/
  4. # Bug tracker........ http://k4ever.someserver.de/report
  5. #
  6. # Licensed under GNU Affero General Public License v3 or later
  7. from django.core.exceptions import ValidationError
  8. from decimal import Decimal
  9. def validate_notZero(value):
  10. if value == Decimal("0.0") :
  11. raise ValidationError(u'%s is not an real number\{0.00}' % value)