# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-07-11 12:03
from __future__ import unicode_literals

import django.core.files.storage
from django.db import migrations, models
import django.db.models.deletion
import press.models


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("journal", "0001_initial"),
        ("core", "0001_initial"),
        ("carousel", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="Press",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=600)),
                (
                    "domain",
                    models.CharField(default="localhost", max_length=255, unique=True),
                ),
                ("footer_description", models.TextField(blank=True, null=True)),
                (
                    "main_contact",
                    models.EmailField(default="janeway@voyager.com", max_length=254),
                ),
                ("theme", models.CharField(default="press", max_length=255)),
                ("homepage_news_items", models.PositiveIntegerField(default=5)),
                (
                    "carousel_type",
                    models.CharField(
                        choices=[
                            ("articles", "Latest Articles"),
                            ("news", "Latest News"),
                            ("news_and_articles", "Latest News and Articles"),
                        ],
                        default="articles",
                        max_length=30,
                    ),
                ),
                ("carousel_items", models.PositiveIntegerField(default=4)),
                (
                    "default_carousel_image",
                    models.ImageField(
                        blank=True,
                        null=True,
                        storage=django.core.files.storage.FileSystemStorage(
                            location="/home/ajrbyers/code/janeway/src/media"
                        ),
                        upload_to=press.models.cover_images_upload_path,
                    ),
                ),
                (
                    "favicon",
                    models.ImageField(
                        blank=True,
                        null=True,
                        storage=django.core.files.storage.FileSystemStorage(
                            location="/home/ajrbyers/code/janeway/src/media"
                        ),
                        upload_to=press.models.cover_images_upload_path,
                    ),
                ),
                (
                    "is_secure",
                    models.BooleanField(
                        default=False,
                        help_text="If the press should redirect to HTTPS, mark this.",
                    ),
                ),
                ("random_featured_journals", models.BooleanField(default=False)),
                ("password_reset_text", models.TextField(blank=True, null=True)),
                ("registration_text", models.TextField(blank=True, null=True)),
                (
                    "carousel",
                    models.OneToOneField(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="press",
                        to="carousel.Carousel",
                    ),
                ),
                (
                    "carousel_news_items",
                    models.ManyToManyField(blank=True, null=True, to="core.NewsItem"),
                ),
                (
                    "featured_journals",
                    models.ManyToManyField(blank=True, null=True, to="journal.Journal"),
                ),
                (
                    "thumbnail_image",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="press_thumbnail_image",
                        to="core.File",
                    ),
                ),
            ],
        ),
    ]
