Python django.core.validators.DecimalValidator() Examples
The following are 10
code examples of django.core.validators.DecimalValidator().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
django.core.validators
, or try the search function
.
Example #1
Source File: fields.py From bioforum with MIT License | 5 votes |
def __init__(self, *, max_value=None, min_value=None, max_digits=None, decimal_places=None, **kwargs): self.max_digits, self.decimal_places = max_digits, decimal_places super().__init__(max_value=max_value, min_value=min_value, **kwargs) self.validators.append(validators.DecimalValidator(max_digits, decimal_places))
Example #2
Source File: __init__.py From bioforum with MIT License | 5 votes |
def validators(self): return super().validators + [ validators.DecimalValidator(self.max_digits, self.decimal_places) ]
Example #3
Source File: fields.py From Hands-On-Application-Development-with-PyCharm with MIT License | 5 votes |
def __init__(self, *, max_value=None, min_value=None, max_digits=None, decimal_places=None, **kwargs): self.max_digits, self.decimal_places = max_digits, decimal_places super().__init__(max_value=max_value, min_value=min_value, **kwargs) self.validators.append(validators.DecimalValidator(max_digits, decimal_places))
Example #4
Source File: __init__.py From Hands-On-Application-Development-with-PyCharm with MIT License | 5 votes |
def validators(self): return super().validators + [ validators.DecimalValidator(self.max_digits, self.decimal_places) ]
Example #5
Source File: fields.py From python with Apache License 2.0 | 5 votes |
def __init__(self, max_value=None, min_value=None, max_digits=None, decimal_places=None, *args, **kwargs): self.max_digits, self.decimal_places = max_digits, decimal_places super(DecimalField, self).__init__(max_value, min_value, *args, **kwargs) self.validators.append(validators.DecimalValidator(max_digits, decimal_places))
Example #6
Source File: __init__.py From python with Apache License 2.0 | 5 votes |
def validators(self): return super(DecimalField, self).validators + [ validators.DecimalValidator(self.max_digits, self.decimal_places) ]
Example #7
Source File: fields.py From openhgsenti with Apache License 2.0 | 5 votes |
def __init__(self, max_value=None, min_value=None, max_digits=None, decimal_places=None, *args, **kwargs): self.max_digits, self.decimal_places = max_digits, decimal_places super(DecimalField, self).__init__(max_value, min_value, *args, **kwargs) self.validators.append(validators.DecimalValidator(max_digits, decimal_places))
Example #8
Source File: __init__.py From openhgsenti with Apache License 2.0 | 5 votes |
def validators(self): return super(DecimalField, self).validators + [ validators.DecimalValidator(self.max_digits, self.decimal_places) ]
Example #9
Source File: fields.py From python2017 with MIT License | 5 votes |
def __init__(self, max_value=None, min_value=None, max_digits=None, decimal_places=None, *args, **kwargs): self.max_digits, self.decimal_places = max_digits, decimal_places super(DecimalField, self).__init__(max_value, min_value, *args, **kwargs) self.validators.append(validators.DecimalValidator(max_digits, decimal_places))
Example #10
Source File: __init__.py From python2017 with MIT License | 5 votes |
def validators(self): return super(DecimalField, self).validators + [ validators.DecimalValidator(self.max_digits, self.decimal_places) ]