# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-07 23:16
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('sites', '0002_alter_domain_unique'),
    ]

    operations = [
        migrations.CreateModel(
            name='Entry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256)),
                ('raw_content', models.TextField(help_text='Content entered by the author.')),
                ('content_format', models.CharField(choices=[('html', 'HTML'), ('rst', 'reStructured Text'), ('md', 'Markdown (not yet supported)')], max_length=4)),
                ('rendered_content', models.TextField(editable=False)),
                ('published', models.BooleanField(default=False, help_text='Show this entry to the public')),
                ('slug', models.SlugField(help_text='A slug/url used to identify this entry.', max_length=255, unique=True)),
                ('date_slug', models.SlugField(editable=False, help_text='A slug/url used to identify this entry; also includes the date on which the entry was published.', max_length=255, unique=True)),
                ('tag_string', models.TextField(blank=True, help_text='A comma-separated list of tags.')),
                ('published_on', models.DateTimeField(blank=True, editable=False, null=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
            ],
            options={
                'verbose_name': 'Entry',
                'get_latest_by': 'published_on',
                'ordering': ['-published_on', 'title'],
                'verbose_name_plural': 'Entries',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('slug', models.SlugField(editable=False, max_length=256, unique=True)),
            ],
            options={
                'verbose_name': 'Tag',
                'ordering': ['name'],
                'verbose_name_plural': 'Tags',
            },
        ),
        migrations.AddField(
            model_name='entry',
            name='tags',
            field=models.ManyToManyField(editable=False, to='blargg.Tag'),
        ),
    ]
