#29852: Infinite migrations when using SimpleLazyObject in field arguments
------------------------------+------------------------------------
     Reporter:  Javier Buzzi  |                    Owner:  nobody
         Type:  Bug           |                   Status:  new
    Component:  Migrations    |                  Version:  master
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Accepted
    Has patch:  1             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  1
Easy pickings:  0             |                    UI/UX:  0
------------------------------+------------------------------------

Comment (by Javier Buzzi):

 @SimonCharette all this makes 100% sense.

 As a followup, going back to my original example, what is the acceptable
 migration that is to be generated?


 {{{
 class Migration(migrations.Migration):

     initial = True

     dependencies = [
     ]

     operations = [
         migrations.CreateModel(
             name='Thing',
             fields=[
                 ('id', models.AutoField(auto_created=True,
 primary_key=True, serialize=False, verbose_name='ID')),
                 ('day',
 
models.DateTimeField(validators=[django.core.validators.MinValueValidator(lazy(datetime.datetime.now,
 datetime.datetime))])),
                 ('day2',
 models.DateTimeField(validators=[hello.app.models.valid_less_than2])),
             ],
         ),
     ]
 }}}

 or perhaps

 {{{
 ('day',
 
models.DateTimeField(validators=[django.core.validators.MinValueValidator(datetime.datetime.now))])),
 }}}

 If we can agree to what is the desired outcome, perhaps i'll be able to
 work backwards.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29852#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.3e8792c86a172b32f54cdf5eb264a270%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to