# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-20 18:56
from __future__ import unicode_literals

import base.models
from django.db import migrations, models
import django.db.models.deletion
import easy_thumbnails.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('government_structures', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Presidency',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='creation date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='edition date', null=True)),
                ('name', models.CharField(max_length=100, verbose_name='name')),
                ('title', models.CharField(max_length=50, verbose_name='title')),
                ('photo', easy_thumbnails.fields.ThumbnailerImageField(null=True, upload_to=base.models.file_path, verbose_name='photo')),
                ('description', models.TextField(verbose_name='description')),
                ('twitter', models.CharField(max_length=50)),
                ('url', models.URLField(verbose_name='url')),
                ('government_structure', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='government_structures.GovernmentStructure', verbose_name='government structure')),
            ],
            options={
                'verbose_name': 'presidency',
                'verbose_name_plural': 'presidencies',
                'permissions': (('view_presidency', 'Can view presidency'),),
            },
        ),
        migrations.CreateModel(
            name='PresidencyURL',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='creation date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='edition date', null=True)),
                ('url', models.URLField(verbose_name='url')),
                ('description', models.TextField(verbose_name='description')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='presidency',
            name='urls',
            field=models.ManyToManyField(to='presidencies.PresidencyURL', verbose_name='urls'),
        ),
    ]
