[1.8.x] Fixed #25384 -- Ordered imports in newly created migration files

This commit is contained in:
Markus Holtermann 2015-09-12 12:04:27 +10:00
parent 95c00c40ae
commit 3cc5cc7958
2 changed files with 4 additions and 1 deletions

View File

@ -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):

View File

@ -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`).