diff --git a/django/db/migrations/writer.py b/django/db/migrations/writer.py index b4417aadba0..1bed59b3ef2 100644 --- a/django/db/migrations/writer.py +++ b/django/db/migrations/writer.py @@ -470,7 +470,7 @@ MIGRATION_TEMPLATE = """\ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import models, migrations +from django.db import migrations, models %(imports)s class Migration(migrations.Migration): diff --git a/docs/releases/1.8.5.txt b/docs/releases/1.8.5.txt index 3f999acfba9..c2557bd1c2a 100644 --- a/docs/releases/1.8.5.txt +++ b/docs/releases/1.8.5.txt @@ -26,3 +26,6 @@ Bugfixes * Fixed autocompletion for options of non-``argparse`` management commands (:ticket:`25372`). + +* Alphabetized ordering of imports in ``from django.db import migrations, + models`` statement in newly created migrations (:ticket:`25384`).