# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-22 21:21
from __future__ import unicode_literals

from django.db import migrations


def gen_animal_houses(apps, schema_editor):
    Animal = apps.get_model('testpage', 'Animal')
    House = apps.get_model('testpage', 'House')
    for a in Animal.objects.all():
        House.objects.create(
            location=any(['Desert', 'Plains', 'Arctic', 'America', 'Europe']),
            description='This is the location a dog could live at.'
        )


class Migration(migrations.Migration):

    dependencies = [
        ('testpage', '0003_auto_animal_house'),
    ]

    operations = [
        migrations.RunPython(gen_animal_houses),
    ]
