#24155: Sorting field kwargs in migrations
--------------------------------------+------------------------------------
     Reporter:  tdobrovolny           |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Migrations            |                  Version:  1.7
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by tdobrovolny):

 Not only `fields` kwargs in migration but also:

 == imports ==

 One time:

 {{{
 from django.db import models, migrations
 from django.conf import settings
 import datetime
 import django.db.models.deletion
 import django.core.validators
 from django.utils.timezone import utc
 }}}

 Next time:

 {{{
 from django.db import models, migrations
 from django.utils.timezone import utc
 import django.core.validators
 import django.db.models.deletion
 import datetime
 from django.conf import settings
 }}}


 == dependencies member of Migration class ==

 One time:

 {{{
 class Migration(migrations.Migration):

     dependencies = [
         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
         ('iso3166', '0002_initialdata'),
         ('auth', '0001_initial'),
     ]
 }}}

 Next time:


 {{{
 class Migration(migrations.Migration):

     dependencies = [
         ('iso3166', '0002_initialdata'),
         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
         ('auth', '0001_initial'),
     ]
 }}}

 == and ==
  * `options`
  * and `models.ForeignKey`, `ManyToManyField` and `OneToOneField kwargs`,

--
Ticket URL: <https://code.djangoproject.com/ticket/24155#comment:2>
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.e6c6728e3afd39c769f0d0d2613af403%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to