# -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-04-20 15:11
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
import molo.core.models


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0032_add_bulk_delete_page_permission'),
        ('core', '0055_migrate_current_site_languages_to_language_relation'),
    ]

    operations = [
        migrations.CreateModel(
            name='ArticlePageTags',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='nav_tags', to='core.ArticlePage')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('feature_in_homepage', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            bases=(molo.core.models.TranslatablePageMixin, 'wagtailcore.page'),
        ),
        migrations.CreateModel(
            name='TagIndexPage',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
            ],
            options={
                'abstract': False,
            },
            bases=('wagtailcore.page', molo.core.models.PreventDeleteMixin),
        ),
        migrations.AddField(
            model_name='sitesettings',
            name='enable_tag_navigation',
            field=models.BooleanField(default=False, help_text=b'Enable tag navigation. When this is true, the clickable tag functionality will be overriden'),
        ),
        migrations.AddField(
            model_name='articlepagetags',
            name='tag',
            field=models.ForeignKey(blank=True, help_text='Tags for tag navigation', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailcore.Page'),
        ),
    ]
