mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
Refactored OPERATOR_MAPPING so that it exists as django.db.connection.operators instead of django.db.backend.OPERATOR_MAPPING. Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b3912d3609
commit
14db37319b
9 changed files with 116 additions and 124 deletions
|
@ -1,5 +1,5 @@
|
|||
from django.conf import settings
|
||||
from django.db import backend, connection, transaction
|
||||
from django.db import connection, transaction
|
||||
from django.db.models.fields import DateField, FieldDoesNotExist
|
||||
from django.db.models import signals, loading
|
||||
from django.dispatch import dispatcher
|
||||
|
@ -797,7 +797,7 @@ def get_where_clause(lookup_type, table_prefix, field_name, value, db_type):
|
|||
else:
|
||||
format = '%s %s'
|
||||
try:
|
||||
return format % (field_sql, backend.OPERATOR_MAPPING[lookup_type] % cast_sql)
|
||||
return format % (field_sql, connection.operators[lookup_type] % cast_sql)
|
||||
except KeyError:
|
||||
pass
|
||||
if lookup_type == 'in':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue