      return res
  Database.convertVariantToPython = variantToPython
  
  class DatabaseOperations(BaseDatabaseOperations):
      def date_extract_sql(self, lookup_type, field_name):
          return "DATEPART(%s, %s)" % (lookup_type, field_name)
  
      def date_trunc_sql(self, lookup_type, field_name):
          if lookup_type == 'year':
 
</s> remove     if lookup_type in ('iexact', 'icontains', 'istartswith', 'iendswith') and backend.needs_upper_for_iops:
 </s> add     if lookup_type in ('iexact', 'icontains', 'istartswith', 'iendswith') and connection.features.needs_upper_for_iops:
class DatabaseFeatures(BaseDatabaseFeatures):
    supports_tablespaces = True

      return res
  Database.convertVariantToPython = variantToPython
  
class DatabaseFeatures(BaseDatabaseFeatures):
    supports_tablespaces = True

  class DatabaseOperations(BaseDatabaseOperations):
      def date_extract_sql(self, lookup_type, field_name):
          return "DATEPART(%s, %s)" % (lookup_type, field_name)
  
      def date_trunc_sql(self, lookup_type, field_name):
          if lookup_type == 'year':
keep keep add keep keep keep keep keep keep
 Implemented BaseDatabaseFeatures and changed all code to access it -- connection.features.foo instead of backend.foo

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5974 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/db/backends/ado_mssql/base.py