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