def initial_photosizes(apps, schema_editor):

    PhotoSize = apps.get_model('photologue', 'PhotoSize')

    # If there are already Photosizes, then we are upgrading an existing
    # installation, we don't want to auto-create some PhotoSizes.
    if PhotoSize.objects.all().count() > 0:
        return
    PhotoSize.objects.create(name='admin_thumbnail',
                             width=100,
                             height=75,
                             crop=True,
                             pre_cache=True,
                             increment_count=False)
    PhotoSize.objects.create(name='thumbnail',
                             width=100,
                             height=75,
                             crop=True,
                             pre_cache=True,
                             increment_count=False)
    PhotoSize.objects.create(name='display',
                             width=400,
                             crop=False,
                             pre_cache=True,
                             increment_count=True)
dataset/ETHPy150Open jdriscoll/django-photologue/photologue/migrations/0002_photosize_data.py/initial_photosizes/original