# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-05-20 11:39
from __future__ import unicode_literals
from django.db.models.signals import post_init

from django.db import migrations

def create_singleton_objects(apps, schema_editor):
    app_name = "course"


    from course.model_classes.CourseState import ActivatedCourse, DeactivatedCourse, IncompleteCourse, TrashedCourse
    ActivatedCourse().save()
    ActivatedCourse.objects.all()[0].setName()
    IncompleteCourse().save()
    IncompleteCourse.objects.all()[0].setName()
    DeactivatedCourse().save()
    DeactivatedCourse.objects.all()[0].setName()
    TrashedCourse().save()
    TrashedCourse.objects.all()[0].setName()



    CourseCatalog = apps.get_model(app_name, "CourseCatalog")
    CourseCatalog().save()


class Migration(migrations.Migration):

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

    operations = [
        migrations.RunPython(create_singleton_objects),
    ]
