summaryrefslogtreecommitdiff
path: root/django/db/models/sql/constants.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2020-04-05 15:45:06 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-04-06 10:19:49 +0200
commit513948735b799239f3ef8c89397592445e1a0cd5 (patch)
tree8209114fe5dcd254318c86781bcce54c95d98d80 /django/db/models/sql/constants.py
parent98ea4f0f4696221f00e111f1d623452002192e6c (diff)
Fixed #31426 -- Added proper field validation to QuerySet.order_by().
Resolve the field reference instead of using fragile regex based string reference validation.
Diffstat (limited to 'django/db/models/sql/constants.py')
-rw-r--r--django/db/models/sql/constants.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/django/db/models/sql/constants.py b/django/db/models/sql/constants.py
index 1ff44252c5..a1db61b9ff 100644
--- a/django/db/models/sql/constants.py
+++ b/django/db/models/sql/constants.py
@@ -2,8 +2,6 @@
Constants specific to the SQL storage portion of the ORM.
"""
-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.
GET_ITERATOR_CHUNK_SIZE = 100
@@ -16,7 +14,6 @@ SINGLE = 'single'
CURSOR = 'cursor'
NO_RESULTS = 'no results'
-ORDER_PATTERN = _lazy_re_compile(r'\?|[-+]?[.\w]+$')
ORDER_DIR = {
'ASC': ('ASC', 'DESC'),
'DESC': ('DESC', 'ASC'),