# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-09 12:14
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import modelcluster.contrib.taggit
import modelcluster.fields


class Migration(migrations.Migration):
    dependencies = [
        ("taggit", "0002_auto_20150616_2121"),
        ("tests", "0005_article_fk_to_newspaper"),
    ]

    operations = [
        migrations.CreateModel(
            name="TaggedArticle",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "content_object",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tagged_items",
                        to="tests.Article",
                    ),
                ),
                (
                    "tag",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tests_taggedarticle_items",
                        to="taggit.Tag",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="article",
            name="tags",
            field=modelcluster.contrib.taggit.ClusterTaggableManager(
                blank=True,
                help_text="A comma-separated list of tags.",
                through="tests.TaggedArticle",
                to="taggit.Tag",
                verbose_name="Tags",
            ),
        ),
    ]
