Django DateField default value and migrations fail

Hi All, there was a problem https://bitbucket.org/pypy/pypy/issues/2062/inconsistency-in-__repr__-for-da... which caused Django not to make migrations https://code.djangoproject.com/ticket/24779 and the problem was fixed https://bitbucket.org/pypy/pypy/pull-requests/325/fixed-2062-treated-date-da... but it works for correct migrations fine for default values for Django with DateTimeField say class SomeClass(models.Model): date_add = models.DateTimeField(verbose_name=_('date created'), default=timezone.now) but code for DataField with default values from datetime import date class AnotherClass(models.Model): start_date = models.DateField( verbose_name=u'start date', default=date.today, ) end_date = models.DateField( verbose_name=u'end date', default=date.today, ) still causes error of the kind: topics/migrations/#migration-serializing" % (value, get_docs_version()) ValueError: Cannot serialize: <bound method type.today of <class 'datetime.date' so somehow something else should be fixed in the same way it was done - but I cannot figure out where to look at. ( and it works ok with standard Python and Django ) Any tips? Regards Sergey
participants (1)
-
Sergey Kurdakov