From 3cc5cc79584b66dafac54264d072ac1206426471 Mon Sep 17 00:00:00 2001 From: Markus Holtermann Date: Sat, 12 Sep 2015 12:04:27 +1000 Subject: [PATCH] [1.8.x] Fixed #25384 -- Ordered imports in newly created migration files --- django/db/migrations/writer.py | 2 +- docs/releases/1.8.5.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/django/db/migrations/writer.py b/django/db/migrations/writer.py index b4417aadba..1bed59b3ef 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 3f999acfba..c2557bd1c2 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`).