blob: e279a0669fc7520d2178e8c650067a318c954033 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
"""
>>> from django.db.models.fields import *
# DecimalField
>>> f = DecimalField()
>>> f.to_python(3)
Decimal("3")
>>> f.to_python("3.14")
Decimal("3.14")
>>> f.to_python("abc")
Traceback (most recent call last):
...
ValidationError: [u'This value must be a decimal number.']
"""
|