# Generated by Django 2.1.2 on 2019-01-12 20:43

from django.db import migrations


def create_settings(apps, schema_editor):
    Settings = apps.get_model("settings", "Settings")

    count = int(Settings.objects.filter().count())

    if count == 0:
        settings = Settings.objects.create()
        settings.site_logo = None
        settings.page_title = "Title"
        settings.homepage_text = "Homepage text"
        settings.footer_text = "Footer text"
        settings.left_column_text = "Left column"
        settings.mourning_mode = False

        settings.save()


class Migration(migrations.Migration):
    dependencies = [
        ('settings', '0004_settings_left_column_text'),
    ]

    operations = [
        migrations.RunPython(create_settings),
    ]
