# Generated by Django 3.1.3 on 2020-11-05 15:58

from django.db import migrations
from decouple import config


def generate_superuser(apps, schema_editor):
    from django.contrib.auth.models import User

    superuser = User.objects.create_superuser(
        username=config('ADMIN_USERNAME'),
        email=config('ADMIN_EMAIL'),
        password=config('ADMIN_PASSWORD')
    )

    superuser.save()


class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length')
    ]


    operations = [
        migrations.RunPython(generate_superuser),
    ]
