# Generated by Django 2.0.3 on 2018-07-04 10:20

import common.validators
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Gallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=255)),
                ('content', tinymce.models.HTMLField(verbose_name='Content')),
                ('date_created', models.DateField(auto_now=True)),
                ('date_modified', models.DateField(auto_now=True)),
                ('is_active', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ['-title'],
            },
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('date_added', models.DateField(auto_now=True)),
                ('image', models.ImageField(default='default.png', upload_to='gallery/', validators=[common.validators.validate_image])),
                ('is_active', models.BooleanField(default=False)),
                ('gallery', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gallery.Gallery')),
            ],
            options={
                'ordering': ['-title'],
            },
        ),
    ]
