# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-03 22:50
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import storages.backends.dropbox


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Articulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=120)),
                ('slug', models.SlugField(blank=True, max_length=150, unique=True)),
                ('imagen', models.ImageField(blank=True, null=True, storage=storages.backends.dropbox.DropBoxStorage(), upload_to=b'')),
                ('contenido', models.TextField()),
                ('fecha_publicacion', models.DateTimeField(auto_now_add=True)),
                ('ultima_actualizacion', models.DateTimeField(auto_now=True)),
                ('autor', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-fecha_publicacion'],
                'db_table': 'articulos',
                'permissions': [('es_autor', 'es autor')],
            },
        ),
        migrations.CreateModel(
            name='Categoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=30)),
                ('filtro', models.CharField(max_length=30)),
                ('descripcion', models.TextField()),
            ],
            options={
                'ordering': ['nombre'],
                'db_table': 'categorias',
            },
        ),
        migrations.AddField(
            model_name='articulo',
            name='categoria',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='articulo.Categoria'),
        ),
    ]
