I don't think it Django should work/accept Mysql's 0000-00-00. The correct data you need is NULL. Besides, since version 5, Mysql doesn't accept that value on Date fields anymore by default.
On 11/2/06, wam <[EMAIL PROTECTED]> wrote: > > I just discovered a ticket that I have submitted a patch to > (ticket:2763 - http://code.djangoproject.com/ticket/2763) is a > duplicate of not only another ticket that I had initially seen > (ticket:2369 - http://code.djangoproject.com/ticket/2369) but a much > older ticket (ticket:443 - http://code.djangoproject.com/ticket/443) > which was marked as "won't fix" a little more than a year ago. > > I'd like to propose that this decision be reconsidered. I hope this > isn't too much of a paraphrase, but it seems that the resolution of 443 > boiled down that 0000-00-00 time/date stamps are a MySQL botch and not > something Django should work around. The thing is, if Django claims to > support legacy databases and also claims to support MySQL, then it has > to be able to handle in a reasonable manner databases which for one > reason or another already includes "zero-" time/datestamps. > > I first came across this issue was in having django-admin throw > traceback errors when running inspectdb on a pre-existing database. > I've written a patch which is limited to just the Mysql backend and > maps zero time, date and timedate fields to the django value of None. > The patch is at > http://code.djangoproject.com/attachment/ticket/2763/django-mysql-zero-typcast-ticket2763.diff > > > It might not be elegant to support quirks in a database vendor's > implimentation; however, I think the praticality of supporting legacy > databases should be taken into account over the puristic view of not > dirting Django to confirm to MySQL's method of expressing > invalid/default data. > > -- William > > > > > -- Julio Nobrega - http://www.inerciasensorial.com.br --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---
