Ticket #1777: django_sqlite.diff

File django_sqlite.diff, 1.2 KB (added by dart@…, 19 years ago)

diff from svn

  • django/db/backends/sqlite3/base.py

     
    1111Database.register_converter("time", util.typecast_time)
    1212Database.register_converter("date", util.typecast_date)
    1313Database.register_converter("datetime", util.typecast_timestamp)
     14Database.register_converter("timestamp", util.typecast_timestamp)
     15Database.register_converter("TIMESTAMP", util.typecast_timestamp)
    1416
    1517def utf8rowFactory(cursor, row):
    1618    def utf8(s):
     
    3537    def cursor(self):
    3638        from django.conf import settings
    3739        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
    3943            # register extract and date_trun functions
    4044            self.connection.create_function("django_extract", 2, _sqlite_extract)
    4145            self.connection.create_function("django_date_trunc", 2, _sqlite_date_trunc)
Back to Top