# Generated by Django 3.0.3 on 2020-02-29 18:34

from django.db import migrations
from django.conf import settings

def forwards_func(apps, schema_editor):
    if settings.DEBUG:
        # Only in DEBUG mode!
        try:            
            from authapp.models import ShopUser
            ShopUser.objects.create_superuser(
                "admin", "admin@ya.ru", "admin", age=33
            )            
        except:
            print("Cann't create super user for debug")


def reverse_func(apps, schema_editor):
    if settings.DEBUG:
        # Only in DEBUG mode!
        try:
            from authnapp.models import ShopUser

            ShopUser.objects.create_superuser(
                "admin", "admin@ya.ru", "admin", age=33
            )
        except:
            print("Cann't delete super user for debug")

class Migration(migrations.Migration):

    dependencies = [
        ('authapp', '0001_initial'),
    ]

    operations = [migrations.RunPython(forwards_func, reverse_func)
    ]
