Commits

Andrew Godwin committed b2bc7d8

Fix for #254 (forgot to unquote datetime).

  • Participants
  • Parent commits ae7db65

Comments (0)

Files changed (1)

south/db/generic.py

                     # Now do some very cheap quoting. TODO: Redesign return values to avoid this.
                     if isinstance(default, basestring):
                         default = "'%s'" % default.replace("'", "''")
-                    elif isinstance(default, (datetime.date, datetime.time)):
+                    elif isinstance(default, (datetime.date, datetime.time, datetime.datetime)):
                         default = "'%s'" % default
                     sql += " DEFAULT %s"
                     sqlparams = (default)