Code

Ticket #20145: ticket20145-2.diff

File ticket20145-2.diff, 456 bytes (added by dgl, 16 months ago)

updated patch

Line 
1diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
2index a925f0c..7283b14 100644
3--- a/django/db/models/fields/__init__.py
4+++ b/django/db/models/fields/__init__.py
5@@ -2,7 +2,10 @@ from __future__ import unicode_literals
6 
7 import copy
8 import datetime
9-import decimal
10+try:
11+    import cdecimal as decimal
12+except ImportError:
13+    import decimal
14 import math
15 import warnings
16 from base64 import b64decode, b64encode