From 08cac47ba0739d8346495a491d0d288f50a4186d Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 1 Jul 2006 05:41:48 +0000 Subject: [PATCH] Removed stray references to (now deprecated) !__ne query type. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3254 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/oracle/base.py | 1 - django/db/models/fields/__init__.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 9943ac9610..188c4bb678 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -122,7 +122,6 @@ OPERATOR_MAPPING = { 'iexact': 'LIKE %s', 'contains': 'LIKE %s', 'icontains': 'LIKE %s', - 'ne': '!= %s', 'gt': '> %s', 'gte': '>= %s', 'lt': '< %s', diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 5882423509..f99f555625 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -162,7 +162,7 @@ class Field(object): def get_db_prep_lookup(self, lookup_type, value): "Returns field's value prepared for database lookup." - if lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'ne', 'year', 'month', 'day', 'search'): + if lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'year', 'month', 'day', 'search'): return [value] elif lookup_type in ('range', 'in'): return value @@ -414,7 +414,7 @@ class DateField(Field): def get_db_prep_lookup(self, lookup_type, value): if lookup_type == 'range': value = [str(v) for v in value] - elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'ne') and hasattr(value, 'strftime'): + elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte') and hasattr(value, 'strftime'): value = value.strftime('%Y-%m-%d') else: value = str(value)