# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-08-25 07:21
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('jmbo', '0003_auto_20160530_1247'),
        ('contenttypes', '0002_remove_content_type_name'),
        ('sites', '0002_alter_domain_unique'),
        ('category', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Listing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(help_text=b'A short descriptive title.', max_length=256)),
                ('subtitle', models.CharField(blank=True, help_text=b'Some titles may be the same. A subtitle makes a distinction. It is not displayed on the site.', max_length=256, null=True)),
                ('slug', models.SlugField(max_length=32)),
                ('count', models.IntegerField(default=0, help_text=b'Number of items to display (excludes any pinned items).\nSet to zero to display all items.')),
                ('style', models.CharField(choices=[(b'Horizontal', b'Horizontal'), (b'Vertical', b'Vertical'), (b'Promo', b'Promo'), (b'VerticalThumbnail', b'VerticalThumbnail'), (b'Widget', b'Widget'), (b'CustomFive', b'CustomFive'), (b'CustomFour', b'CustomFour'), (b'CustomOne', b'CustomOne'), (b'CustomThree', b'CustomThree'), (b'CustomTwo', b'CustomTwo'), (b'Horizontal', b'Horizontal'), (b'Promo', b'Promo'), (b'Vertical', b'Vertical'), (b'VerticalThumbnail', b'VerticalThumbnail'), (b'Widget', b'Widget'), (b'Widget', b'Widget'), (b'CustomOne', b'CustomOne'), (b'CustomTwo', b'CustomTwo'), (b'CustomThree', b'CustomThree'), (b'CustomFour', b'CustomFour'), (b'CustomFive', b'CustomFive')], max_length=64)),
                ('items_per_page', models.PositiveIntegerField(default=0, help_text=b'Number of items displayed on a page (excludes any pinned items). Set to zero to disable paging.')),
                ('categories', models.ManyToManyField(blank=True, help_text=b'Categories for which to collect items.', null=True, related_name='listing_categories', to='category.Category')),
            ],
            options={
                'ordering': ('title', 'subtitle'),
            },
        ),
        migrations.CreateModel(
            name='ListingContent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.PositiveIntegerField(default=0)),
                ('listing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='content_link_to_listing', to='listing.Listing')),
                ('modelbase_obj', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jmbo.ModelBase')),
            ],
        ),
        migrations.CreateModel(
            name='ListingPinned',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.PositiveIntegerField(default=0)),
                ('listing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pinned_link_to_listing', to='listing.Listing')),
                ('modelbase_obj', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jmbo.ModelBase')),
            ],
        ),
        migrations.AddField(
            model_name='listing',
            name='content',
            field=models.ManyToManyField(blank=True, help_text=b'Individual items to display. Setting this will ignore any setting for <i>Content Type</i>, <i>Categories</i> and <i>Tags</i>.', null=True, related_name='listing_content', through='listing.ListingContent', to='jmbo.ModelBase'),
        ),
        migrations.AddField(
            model_name='listing',
            name='content_types',
            field=models.ManyToManyField(blank=True, help_text=b'Content types to display, eg. post or gallery.', null=True, to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='listing',
            name='pinned',
            field=models.ManyToManyField(blank=True, help_text=b'Individual items to pin to the top of the listing. These\nitems are visible across all pages when navigating the listing.', null=True, related_name='listing_pinned', through='listing.ListingPinned', to='jmbo.ModelBase'),
        ),
        migrations.AddField(
            model_name='listing',
            name='sites',
            field=models.ManyToManyField(blank=True, help_text=b'Sites that this listing will appear on.', null=True, to='sites.Site'),
        ),
        migrations.AddField(
            model_name='listing',
            name='tags',
            field=models.ManyToManyField(blank=True, help_text=b'Tags for which to collect items.', null=True, related_name='listing_tags', to='category.Tag'),
        ),
    ]
