# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-03 01:39
from __future__ import unicode_literals

from django.db import migrations
from django.contrib.auth.hashers import make_password


def create_admin_user(apps, schema_editor):
    User = apps.get_registered_model('auth', 'User')
    admin = User(
        username='admin',
        email='admin@domain.com',
        password=make_password('admin'),
        is_superuser=True,
        is_staff=True
    )
    admin.save()


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]
    operations = [
        migrations.RunPython(create_admin_user),
    ]
