<filename>api/project/apps/gatekeeper/migrations/0005_auto_20150414_1621.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


default_emails = [
    "<EMAIL>",
    "<EMAIL>",
    "<EMAIL>",
]


def add_default_users(apps, schema_editor):

    User = apps.get_model("gatekeeper", "User")
    # for e in default_emails:
    #     assert User.objects.filter(email=e).count() == 0
    #     u = User.objects.create(
    #         email=e,
    #         password="<PASSWORD>=",
    #         must_reset_password=True,
    #     )


def remove_default_users(apps, schema_editor):
    User = apps.get_model("gatekeeper", "User")
    for e in default_emails:
        User.objects.filter(email=e).delete()


class Migration(migrations.Migration):

    dependencies = [
        ('gatekeeper', '0004_auto_20150414_1619'),
    ]

    operations = [
        migrations.RunPython(add_default_users, remove_default_users)
    ]

<filename>api/project/apps/gatekeeper/migrations/0005_auto_20150414_1621.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


default_emails = [
    "<EMAIL>",
    "<EMAIL>",
    "<EMAIL>",
]


def add_default_users(apps, schema_editor):

    User = apps.get_model("gatekeeper", "User")
    # for e in default_emails:
    #     assert User.objects.filter(email=e).count() == 0
    #     u = User.objects.create(
    #         email=e,
    #         password="<PASSWORD>=",
    #         must_reset_password=True,
    #     )


def remove_default_users(apps, schema_editor):
    User = apps.get_model("gatekeeper", "User")
    for e in default_emails:
        User.objects.filter(email=e).delete()


class Migration(migrations.Migration):

    dependencies = [
        ('gatekeeper', '0004_auto_20150414_1619'),
    ]

    operations = [
        migrations.RunPython(add_default_users, remove_default_users)
    ]

# -*- coding: utf-8 -*- # for e in default_emails: #     assert User.objects.filter(email=e).count() == 0 #     u = User.objects.create( #         email=e, #         password="<PASSWORD>=", #         must_reset_password=True, #     )