# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-09-24 15:38
from __future__ import unicode_literals

import colorfield.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('petition', '0006_auto_20181015_0851'),
    ]

    operations = [
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Name')),
            ],
        ),
        migrations.CreateModel(
            name='PetitionTemplate',
            fields=[
                ('background', models.ImageField(blank=True, upload_to='')),
                ('mobile_background', models.ImageField(blank=True, upload_to='')),
                ('top_picture', models.ImageField(blank=True, upload_to='')),
                ('side_text', tinymce.models.HTMLField(blank=True)),
                ('target', models.IntegerField(default=500)),
                ('linear_gradient_direction', models.CharField(blank=True, choices=[('no gradient', 'no gradient'), ('to right', 'to right'), ('to bottom', 'to bottom'), ('to bottom right', 'to bottom right'), ('to bottom left', 'to bottom left')], default='no gradient', max_length=15)),
                ('gradient_from', colorfield.fields.ColorField(blank=True, max_length=18)),
                ('gradient_to', colorfield.fields.ColorField(blank=True, max_length=18)),
                ('bgcolor', colorfield.fields.ColorField(blank=True, max_length=18)),
                ('footer_text', tinymce.models.HTMLField(default='This petition is hosted on RAP website.')),
                ('footer_links', tinymce.models.HTMLField(blank=True)),
                ('twitter_description', models.CharField(blank=True, max_length=200)),
                ('twitter_image', models.CharField(blank=True, max_length=500)),
                ('has_newsletter', models.BooleanField(default=False)),
                ('newsletter_subscribe_http_data', models.TextField(blank=True)),
                ('newsletter_subscribe_http_mailfield', models.CharField(blank=True, max_length=100)),
                ('newsletter_subscribe_http_url', models.CharField(blank=True, max_length=1000)),
                ('newsletter_subscribe_mail_subject', models.CharField(blank=True, max_length=1000)),
                ('newsletter_subscribe_mail_from', models.CharField(blank=True, max_length=500)),
                ('newsletter_subscribe_mail_to', models.CharField(blank=True, max_length=500)),
                ('newsletter_subscribe_method', models.CharField(choices=[('MAIL', 'MAIL'), ('POST', 'POST'), ('GET', 'GET')], default='MAIL', max_length=4)),
                ('newsletter_subscribe_mail_smtp_host', models.CharField(default='localhost', max_length=100)),
                ('newsletter_subscribe_mail_smtp_port', models.IntegerField(default=25)),
                ('newsletter_subscribe_mail_smtp_user', models.CharField(blank=True, max_length=200)),
                ('newsletter_subscribe_mail_smtp_password', models.CharField(blank=True, max_length=200)),
                ('newsletter_subscribe_mail_smtp_tls', models.BooleanField(default=False)),
                ('newsletter_subscribe_mail_smtp_starttls', models.BooleanField(default=False)),
                ('org_twitter_handle', models.CharField(max_length=20)),
                ('newsletter_text', models.CharField(blank=True, max_length=1000)),
                ('sign_form_footer', models.TextField(blank=True)),
                ('confirmation_email_sender', models.CharField(max_length=100)),
                ('confirmation_email_smtp_host', models.CharField(default='localhost', max_length=100)),
                ('confirmation_email_smtp_port', models.IntegerField(default=25)),
                ('confirmation_email_smtp_user', models.CharField(blank=True, max_length=200)),
                ('confirmation_email_smtp_password', models.CharField(blank=True, max_length=200)),
                ('confirmation_email_smtp_tls', models.BooleanField(default=False)),
                ('confirmation_email_smtp_starttls', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50, primary_key=True, serialize=False, verbose_name='Name')),
            ],
        ),
        migrations.CreateModel(
            name='PytitionUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('organizations', models.ManyToManyField(blank=True, related_name='members', to='petition.Organization')),
                ('petitions', models.ManyToManyField(blank=True, to='petition.Petition')),
                ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='pytitionuser', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='organization',
            name='petition_templates',
            field=models.ManyToManyField(blank=True, to='petition.PetitionTemplate', verbose_name='Petition templates'),
        ),
        migrations.AddField(
            model_name='organization',
            name='petitions',
            field=models.ManyToManyField(blank=True, to='petition.Petition', verbose_name='Petitions'),
        ),
    ]
