gestioCOF/gestioncof/cms/migrations/0001_initial.py

474 lines
18 KiB
Python
Raw Normal View History

2017-08-07 23:31:27 +02:00
# -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-02-04 20:45
2017-08-07 23:31:27 +02:00
from __future__ import unicode_literals
import django.db.models.deletion
import wagtail.contrib.routable_page.models
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
2019-02-09 14:37:15 +01:00
from django.db import migrations, models
import gestioncof.cms.models
2017-08-07 23:31:27 +02:00
class Migration(migrations.Migration):
2018-01-22 21:24:20 +01:00
initial = True
2017-08-07 23:31:27 +02:00
dependencies = [
2019-02-09 14:37:15 +01:00
("wagtailimages", "0021_image_file_hash"),
("wagtailcore", "0040_page_draft_title"),
2017-08-07 23:31:27 +02:00
]
operations = [
migrations.CreateModel(
2019-02-09 14:37:15 +01:00
name="COFActuIndexPage",
fields=[
2019-02-09 14:37:15 +01:00
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.Page",
),
)
],
options={
2019-02-09 14:37:15 +01:00
"verbose_name": "Index des actualités",
"verbose_name_plural": "Indexs des actualités",
},
2019-02-09 14:37:15 +01:00
bases=("wagtailcore.page", gestioncof.cms.models.COFActuIndexMixin),
),
2017-08-09 00:07:56 +02:00
migrations.CreateModel(
2019-02-09 14:37:15 +01:00
name="COFActuPage",
2017-08-09 00:07:56 +02:00
fields=[
2019-02-09 14:37:15 +01:00
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.Page",
),
),
(
"chapo",
models.TextField(blank=True, verbose_name="Description rapide"),
),
(
"chapo_fr",
models.TextField(
blank=True, null=True, verbose_name="Description rapide"
),
),
(
"chapo_en",
models.TextField(
blank=True, null=True, verbose_name="Description rapide"
),
),
("body", wagtail.core.fields.RichTextField(verbose_name="Contenu")),
(
"body_fr",
wagtail.core.fields.RichTextField(
null=True, verbose_name="Contenu"
),
),
(
"body_en",
wagtail.core.fields.RichTextField(
null=True, verbose_name="Contenu"
),
),
(
"is_event",
models.BooleanField(default=True, verbose_name="Évènement"),
),
(
"date_start",
models.DateTimeField(verbose_name="Date et heure de début"),
),
(
"date_end",
models.DateTimeField(
blank=True,
default=None,
null=True,
verbose_name="Date et heure de fin",
),
),
(
"all_day",
models.BooleanField(default=False, verbose_name="Toute la journée"),
),
(
"image",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="wagtailimages.Image",
verbose_name="Image à la Une",
),
),
2017-08-09 00:07:56 +02:00
],
2019-02-09 14:37:15 +01:00
options={"verbose_name": "Actualité", "verbose_name_plural": "Actualités"},
bases=(
wagtail.contrib.routable_page.models.RoutablePageMixin,
"wagtailcore.page",
),
2017-08-09 00:07:56 +02:00
),
migrations.CreateModel(
2019-02-09 14:37:15 +01:00
name="COFDirectoryEntryPage",
2017-08-09 00:07:56 +02:00
fields=[
2019-02-09 14:37:15 +01:00
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.Page",
),
),
("body", wagtail.core.fields.RichTextField(verbose_name="Description")),
(
"body_fr",
wagtail.core.fields.RichTextField(
null=True, verbose_name="Description"
),
),
(
"body_en",
wagtail.core.fields.RichTextField(
null=True, verbose_name="Description"
),
),
(
"links",
wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.core.blocks.URLBlock(required=True),
),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.core.blocks.EmailBlock(
required=True
),
),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
]
),
),
(
"links_fr",
wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.core.blocks.URLBlock(required=True),
),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.core.blocks.EmailBlock(
required=True
),
),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
],
null=True,
),
),
(
"links_en",
wagtail.core.fields.StreamField(
[
(
"lien",
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.core.blocks.URLBlock(required=True),
),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
(
"contact",
wagtail.core.blocks.StructBlock(
[
(
"email",
wagtail.core.blocks.EmailBlock(
required=True
),
),
("texte", wagtail.core.blocks.CharBlock()),
]
),
),
],
null=True,
),
),
(
"image",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="wagtailimages.Image",
verbose_name="Image",
),
),
2017-08-09 00:07:56 +02:00
],
options={
2019-02-09 14:37:15 +01:00
"verbose_name": "Entrée d'annuaire",
"verbose_name_plural": "Entrées d'annuaire",
2017-08-09 00:07:56 +02:00
},
2019-02-09 14:37:15 +01:00
bases=("wagtailcore.page",),
2017-08-09 00:07:56 +02:00
),
migrations.CreateModel(
2019-02-09 14:37:15 +01:00
name="COFDirectoryPage",
2017-08-09 00:07:56 +02:00
fields=[
2019-02-09 14:37:15 +01:00
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.Page",
),
),
(
"introduction",
wagtail.core.fields.RichTextField(verbose_name="Introduction"),
),
(
"introduction_fr",
wagtail.core.fields.RichTextField(
null=True, verbose_name="Introduction"
),
),
(
"introduction_en",
wagtail.core.fields.RichTextField(
null=True, verbose_name="Introduction"
),
),
(
"alphabetique",
models.BooleanField(
default=True, verbose_name="Tri par ordre alphabétique ?"
),
),
2017-08-09 00:07:56 +02:00
],
options={
2019-02-09 14:37:15 +01:00
"verbose_name": "Annuaire (clubs, partenaires, bons plans...)",
"verbose_name_plural": "Annuaires",
2017-08-09 00:07:56 +02:00
},
2019-02-09 14:37:15 +01:00
bases=("wagtailcore.page",),
2017-08-09 00:07:56 +02:00
),
2017-08-07 23:31:27 +02:00
migrations.CreateModel(
2019-02-09 14:37:15 +01:00
name="COFPage",
2017-08-07 23:31:27 +02:00
fields=[
2019-02-09 14:37:15 +01:00
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.Page",
),
),
(
"body",
wagtail.core.fields.StreamField(
[
(
"heading",
wagtail.core.blocks.CharBlock(classname="full title"),
),
("paragraph", wagtail.core.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.core.blocks.URLBlock(
"Adresse de la page"
),
),
(
"height",
wagtail.core.blocks.CharBlock(
"Hauteur (en pixels)"
),
),
]
),
),
]
),
),
(
"body_fr",
wagtail.core.fields.StreamField(
[
(
"heading",
wagtail.core.blocks.CharBlock(classname="full title"),
),
("paragraph", wagtail.core.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.core.blocks.URLBlock(
"Adresse de la page"
),
),
(
"height",
wagtail.core.blocks.CharBlock(
"Hauteur (en pixels)"
),
),
]
),
),
],
null=True,
),
),
(
"body_en",
wagtail.core.fields.StreamField(
[
(
"heading",
wagtail.core.blocks.CharBlock(classname="full title"),
),
("paragraph", wagtail.core.blocks.RichTextBlock()),
("image", wagtail.images.blocks.ImageChooserBlock()),
(
"iframe",
wagtail.core.blocks.StructBlock(
[
(
"url",
wagtail.core.blocks.URLBlock(
"Adresse de la page"
),
),
(
"height",
wagtail.core.blocks.CharBlock(
"Hauteur (en pixels)"
),
),
]
),
),
],
null=True,
),
),
2017-08-09 00:07:56 +02:00
],
options={
2019-02-09 14:37:15 +01:00
"verbose_name": "Page normale COF",
"verbose_name_plural": "Pages normales COF",
2017-08-09 00:07:56 +02:00
},
2019-02-09 14:37:15 +01:00
bases=("wagtailcore.page",),
2017-08-09 00:07:56 +02:00
),
migrations.CreateModel(
2019-02-09 14:37:15 +01:00
name="COFRootPage",
2017-08-09 00:07:56 +02:00
fields=[
2019-02-09 14:37:15 +01:00
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.Page",
),
),
(
"introduction",
wagtail.core.fields.RichTextField(verbose_name="Introduction"),
),
(
"introduction_fr",
wagtail.core.fields.RichTextField(
null=True, verbose_name="Introduction"
),
),
(
"introduction_en",
wagtail.core.fields.RichTextField(
null=True, verbose_name="Introduction"
),
),
2017-08-07 23:31:27 +02:00
],
options={
2019-02-09 14:37:15 +01:00
"verbose_name": "Racine site du COF",
"verbose_name_plural": "Racines site du COF",
2017-08-07 23:31:27 +02:00
},
2019-02-09 14:37:15 +01:00
bases=("wagtailcore.page", gestioncof.cms.models.COFActuIndexMixin),
2017-08-07 23:31:27 +02:00
),
]