Fixed a compatibility problem with Python 2.3.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2345029d0d
commit
3780a4532c
|
@ -41,7 +41,7 @@ class ISIdNumberField(RegexField):
|
||||||
method is modulo 11.
|
method is modulo 11.
|
||||||
"""
|
"""
|
||||||
check = [3, 2, 7, 6, 5, 4, 3, 2, 1, 0]
|
check = [3, 2, 7, 6, 5, 4, 3, 2, 1, 0]
|
||||||
return sum(int(value[i]) * check[i] for i in range(10)) % 11 == 0
|
return sum([int(value[i]) * check[i] for i in range(10)]) % 11 == 0
|
||||||
|
|
||||||
def _format(self, value):
|
def _format(self, value):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue