# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2020-04-25 04:04
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import sorl.thumbnail.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('contrapartes', '0003_auto_20181018_2308'),
    ]

    operations = [
        migrations.CreateModel(
            name='Publicaciones',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=250)),
                ('slug', models.SlugField(editable=False, max_length=250)),
                ('fecha', models.DateTimeField(auto_now=True)),
                ('imagen_portada', sorl.thumbnail.fields.ImageField(blank=True, null=True, upload_to='foto/publicaciones/')),
                ('autor', models.CharField(max_length=250, verbose_name='Autor de la publicaci\xf3n')),
                ('descripcion', models.TextField(verbose_name='Descripci\xf3n')),
                ('coparte', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contrapartes.Contraparte')),
            ],
            options={
                'verbose_name': 'Publicaci\xf3n',
                'verbose_name_plural': 'Publicaciones',
            },
        ),
        migrations.CreateModel(
            name='Tematicas',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=250)),
                ('slug', models.SlugField(editable=False, max_length=250)),
            ],
            options={
                'verbose_name': 'Tematica',
                'verbose_name_plural': 'Tematicas',
            },
        ),
        migrations.AddField(
            model_name='publicaciones',
            name='tematicas',
            field=models.ManyToManyField(to='biblioteca.Tematicas'),
        ),
        migrations.AddField(
            model_name='publicaciones',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
