  Database.register_adapter(decimal.Decimal, util.rev_typecast_decimal)
  
  class DatabaseOperations(BaseDatabaseOperations):
      def date_extract_sql(self, lookup_type, field_name):
          # sqlite doesn't support extract, so we fake it with the user-defined
          # function django_extract that's registered in connect().
          return 'django_extract("%s", %s)' % (lookup_type.lower(), field_name)
 
</s> remove         if backend.uses_case_insensitive_names:
 </s> add         if connection.features.uses_case_insensitive_names:
class DatabaseFeatures(BaseDatabaseFeatures):
    supports_constraints = False

  Database.register_adapter(decimal.Decimal, util.rev_typecast_decimal)
  
class DatabaseFeatures(BaseDatabaseFeatures):
    supports_constraints = False

  class DatabaseOperations(BaseDatabaseOperations):
      def date_extract_sql(self, lookup_type, field_name):
          # sqlite doesn't support extract, so we fake it with the user-defined
          # function django_extract that's registered in connect().
          return 'django_extract("%s", %s)' % (lookup_type.lower(), field_name)
keep add 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/sqlite3/base.py