summaryrefslogtreecommitdiff
path: root/django/db/models/sql/constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/sql/constants.py')
-rw-r--r--django/db/models/sql/constants.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/constants.py b/django/db/models/sql/constants.py
index 28f4242a7a..1ff44252c5 100644
--- a/django/db/models/sql/constants.py
+++ b/django/db/models/sql/constants.py
@@ -2,7 +2,7 @@
Constants specific to the SQL storage portion of the ORM.
"""
-import re
+from django.utils.regex_helper import _lazy_re_compile
# Size of each "chunk" for get_iterator calls.
# Larger values are slightly faster at the expense of more storage space.
@@ -16,7 +16,7 @@ SINGLE = 'single'
CURSOR = 'cursor'
NO_RESULTS = 'no results'
-ORDER_PATTERN = re.compile(r'\?|[-+]?[.\w]+$')
+ORDER_PATTERN = _lazy_re_compile(r'\?|[-+]?[.\w]+$')
ORDER_DIR = {
'ASC': ('ASC', 'DESC'),
'DESC': ('DESC', 'ASC'),