﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10220	the admin site can not handle the DateField.	duns	nobody	"
{{{
class WInfo(models.Model):
    city = models.CharField(max_length=1, default='A')
    w_date = models.DateField()
    
    def __unicode__(self):
        return str(self.id)
}}}

In the admin site, I fail to add a record. After I modify SplitDateTimeWidget.decompress, it's OK.

""C:\Python25\lib\site-packages\django\forms\widgets.py""

{{{
class SplitDateTimeWidget(MultiWidget):
    ...
    def decompress(self, value):
        if value:
            #return [value.date(), value.time().replace(microsecond=0)]
            if type(value) == 'datetime':
                return [value.day(), value.time().replace(microsecond=0)]
            if type(value) == 'date':
                return [value, None]            
        return [None, None]
}}}
"		closed	Uncategorized	1.0		worksforme			Unreviewed	0	0	0	0	0	0
