diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index ac09b6f5159..6d8816a9d12 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -7,7 +7,10 @@ Requires cx_Oracle: http://cx-oracle.sourceforge.net/ import os import datetime import time -from decimal import Decimal +try: + from decimal import Decimal +except ImportError: + from django.utils._decimal import Decimal # Oracle takes client-side character set encoding from the environment. os.environ['NLS_LANG'] = '.UTF8'