Ticket #184 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

A field's "default" value defined with ugettext_lazy is not understood by startmigration --inital

Reported by: anonymous Owned by: andrew
Priority: major Milestone: 0.6
Component: migrations Version: 0.6-pre
Keywords: Cc:

Description

Given model:

class Profile(models.Model):
    foo = models.CharField(_('foo'), max_length=200, default=_('bar'))

startmigration <appname> --inital returns:

('foo', models.CharField(_('foo'), default=<django.utils.functional.__proxy__ object at 0x9c1496c>, max_length=200))

I do not know if it sane to insert a ugettext_lazy value for "default". But it was working with version 0.5

Attachments

fix_default_eval.diff (878 bytes) - added by anonymous 6 years ago.
quick fix

Change History

Changed 6 years ago by anonymous

quick fix

comment:1 Changed 5 years ago by andrew

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.6

Fixed in [6178d86a92e0].

comment:2 Changed 5 years ago by andrew

...and sanely fixed in [63b2284d12c5], after I actually read the patch. Sorry.

Note: See TracTickets for help on using tickets.