Ticket #1777: django_sqlite.diff
File django_sqlite.diff, 1.2 KB (added by , 19 years ago) |
---|
-
django/db/backends/sqlite3/base.py
11 11 Database.register_converter("time", util.typecast_time) 12 12 Database.register_converter("date", util.typecast_date) 13 13 Database.register_converter("datetime", util.typecast_timestamp) 14 Database.register_converter("timestamp", util.typecast_timestamp) 15 Database.register_converter("TIMESTAMP", util.typecast_timestamp) 14 16 15 17 def utf8rowFactory(cursor, row): 16 18 def utf8(s): … … 35 37 def cursor(self): 36 38 from django.conf import settings 37 39 if self.connection is None: 38 self.connection = Database.connect(settings.DATABASE_NAME, detect_types=Database.PARSE_DECLTYPES) 40 self.connection = Database.connect(settings.DATABASE_NAME, 41 detect_types=Database.PARSE_DECLTYPES|Database.PARSE_COLNAMES) 42 39 43 # register extract and date_trun functions 40 44 self.connection.create_function("django_extract", 2, _sqlite_extract) 41 45 self.connection.create_function("django_date_trunc", 2, _sqlite_date_trunc)