summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-07-30 17:25:35 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-07-30 17:25:35 +0000
commitf27774ee0ab4b2537909d642c23ea6ae6ea8d166 (patch)
tree2a5ff32cbff0bf26b2e005fd6d2ee6c21dadb542 /django
parentd76e5320772686dfc120fe0e32cc816504bf7fb5 (diff)
Fixed call to `ugettext`, which is imported as `_`.
Changed raise to conform to PEP 3109 and wrapped the long line. Added beginnings of tests for model fields. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/db/models/fields/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index 5e3509857b..e254ef4ad5 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -620,7 +620,8 @@ class DecimalField(Field):
try:
return decimal.Decimal(value)
except decimal.InvalidOperation:
- raise validators.ValidationError, ugettext("This value must be a decimal number.")
+ raise validators.ValidationError(
+ _("This value must be a decimal number."))
def _format(self, value):
if isinstance(value, basestring):