My favorites | Sign in
Project Logo
             
Search
for
Updated Sep 22, 2008 by flangy
Datatypes  
Known issues related to Python/DB data types.

Decimals

Python decimal types don't save cleanly in the backend yet, but will after Django #7560 lands.

Dates and Times

Earliest Year

SQL Server provides two datetime types: datetime and smalldatetime.

This backend always uses datetime, which supports dates back to January 1, 1753.

Django previously only supported dates back to 1900, but recent revisions 7946 + 7950 changed this behavior. If you need to store historical data in datetime fields, then SQL Server 2005 will have a problem. (I'd welcome bugs/repro cases/patches on this issue.)

SQL Server 2008 introduces a datetime2 type, with support for fractional seconds and the full range of Python datetime dates. To use this time, edit your local creation.py/introspection.py files to use this datatype instead.

Bare Times

SQL Server 2005 doesn't have a bare "time" datatype, only a datetime. SQL Server 2008 introduces a time type, but this isn't used by this backend. (Patches welcome.)

Unsupported Types

These types may behave oddly in a Django application, as they have limits smaller than what Django expects from similar types:


Sign in to add a comment
Hosted by Google Code