from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Email',
            fields=[
                (u'id', models.AutoField(verbose_name=u'ID', serialize=False, auto_created=True, primary_key=True)),
                ('from_email', models.TextField(verbose_name=u'from e-mail')),
                ('recipients', models.TextField(verbose_name=u'recipients')),
                ('subject', models.TextField(verbose_name=u'subject')),
                ('body', models.TextField(verbose_name=u'body')),
                ('ok', models.BooleanField(default=False, db_index=True, verbose_name=u'ok')),
                ('date_sent', models.DateTimeField(auto_now_add=True, verbose_name=u'date sent', db_index=True)),
            ],
            options={
                u'ordering': (u'-date_sent',),
                u'verbose_name': u'e-mail',
                u'verbose_name_plural': u'e-mails',
            },
            bases=(models.Model,),
        ),
    ]

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False,
                                        auto_created=True, primary_key=True)),
                ('from_email', models.TextField(verbose_name='from e-mail')),
                ('recipients', models.TextField(verbose_name='recipients')),
                ('subject', models.TextField(verbose_name='subject')),
                ('body', models.TextField(verbose_name='body')),
                ('ok', models.BooleanField(default=False, db_index=True,
                                           verbose_name='ok')),
                ('date_sent', models.DateTimeField(auto_now_add=True,
                                                   verbose_name='date sent',
                                                   db_index=True)),
            ],
            options={
                'ordering': ('-date_sent',),
                'verbose_name': 'e-mail',
                'verbose_name_plural': 'e-mails',
            },
            bases=(models.Model,),
        ),
    ]

Fix migration file for Python 3.2 (and PEP8)
Fix migration file for Python 3.2 (and PEP8)

  from django.db import models, migrations
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='Email',
              fields=[
-                 (u'id', models.AutoField(verbose_name=u'ID', serialize=False, auto_created=True, primary_key=True)),
+                 ('id', models.AutoField(verbose_name='ID', serialize=False,
+                                         auto_created=True, primary_key=True)),
-                 ('from_email', models.TextField(verbose_name=u'from e-mail')),
+                 ('from_email', models.TextField(verbose_name='from e-mail')),
-                 ('recipients', models.TextField(verbose_name=u'recipients')),
+                 ('recipients', models.TextField(verbose_name='recipients')),
-                 ('subject', models.TextField(verbose_name=u'subject')),
+                 ('subject', models.TextField(verbose_name='subject')),
-                 ('body', models.TextField(verbose_name=u'body')),
+                 ('body', models.TextField(verbose_name='body')),
-                 ('ok', models.BooleanField(default=False, db_index=True, verbose_name=u'ok')),
+                 ('ok', models.BooleanField(default=False, db_index=True,
+                                            verbose_name='ok')),
-                 ('date_sent', models.DateTimeField(auto_now_add=True, verbose_name=u'date sent', db_index=True)),
+                 ('date_sent', models.DateTimeField(auto_now_add=True,
+                                                    verbose_name='date sent',
+                                                    db_index=True)),
              ],
              options={
-                 u'ordering': (u'-date_sent',),
+                 'ordering': ('-date_sent',),
-                 u'verbose_name': u'e-mail',
+                 'verbose_name': 'e-mail',
-                 u'verbose_name_plural': u'e-mails',
+                 'verbose_name_plural': 'e-mails',
              },
              bases=(models.Model,),
          ),
      ]
  
Fix migration file for Python 3.2 (and PEP8)
## Code Before:
from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Email',
            fields=[
                (u'id', models.AutoField(verbose_name=u'ID', serialize=False, auto_created=True, primary_key=True)),
                ('from_email', models.TextField(verbose_name=u'from e-mail')),
                ('recipients', models.TextField(verbose_name=u'recipients')),
                ('subject', models.TextField(verbose_name=u'subject')),
                ('body', models.TextField(verbose_name=u'body')),
                ('ok', models.BooleanField(default=False, db_index=True, verbose_name=u'ok')),
                ('date_sent', models.DateTimeField(auto_now_add=True, verbose_name=u'date sent', db_index=True)),
            ],
            options={
                u'ordering': (u'-date_sent',),
                u'verbose_name': u'e-mail',
                u'verbose_name_plural': u'e-mails',
            },
            bases=(models.Model,),
        ),
    ]

## Instruction:
Fix migration file for Python 3.2 (and PEP8)
## Code After:
from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False,
                                        auto_created=True, primary_key=True)),
                ('from_email', models.TextField(verbose_name='from e-mail')),
                ('recipients', models.TextField(verbose_name='recipients')),
                ('subject', models.TextField(verbose_name='subject')),
                ('body', models.TextField(verbose_name='body')),
                ('ok', models.BooleanField(default=False, db_index=True,
                                           verbose_name='ok')),
                ('date_sent', models.DateTimeField(auto_now_add=True,
                                                   verbose_name='date sent',
                                                   db_index=True)),
            ],
            options={
                'ordering': ('-date_sent',),
                'verbose_name': 'e-mail',
                'verbose_name_plural': 'e-mails',
            },
            bases=(models.Model,),
        ),
    ]
