473 lines
18 KiB
Python
473 lines
18 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.11.18 on 2019-02-04 20:45
|
|
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
|
|
from django.db import migrations, models
|
|
|
|
import gestioncof.cms.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
("wagtailimages", "0021_image_file_hash"),
|
|
("wagtailcore", "0040_page_draft_title"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="COFActuIndexPage",
|
|
fields=[
|
|
(
|
|
"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={
|
|
"verbose_name": "Index des actualités",
|
|
"verbose_name_plural": "Indexs des actualités",
|
|
},
|
|
bases=("wagtailcore.page", gestioncof.cms.models.COFActuIndexMixin),
|
|
),
|
|
migrations.CreateModel(
|
|
name="COFActuPage",
|
|
fields=[
|
|
(
|
|
"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",
|
|
),
|
|
),
|
|
],
|
|
options={"verbose_name": "Actualité", "verbose_name_plural": "Actualités"},
|
|
bases=(
|
|
wagtail.contrib.routable_page.models.RoutablePageMixin,
|
|
"wagtailcore.page",
|
|
),
|
|
),
|
|
migrations.CreateModel(
|
|
name="COFDirectoryEntryPage",
|
|
fields=[
|
|
(
|
|
"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",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Entrée d'annuaire",
|
|
"verbose_name_plural": "Entrées d'annuaire",
|
|
},
|
|
bases=("wagtailcore.page",),
|
|
),
|
|
migrations.CreateModel(
|
|
name="COFDirectoryPage",
|
|
fields=[
|
|
(
|
|
"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 ?"
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Annuaire (clubs, partenaires, bons plans...)",
|
|
"verbose_name_plural": "Annuaires",
|
|
},
|
|
bases=("wagtailcore.page",),
|
|
),
|
|
migrations.CreateModel(
|
|
name="COFPage",
|
|
fields=[
|
|
(
|
|
"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,
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Page normale COF",
|
|
"verbose_name_plural": "Pages normales COF",
|
|
},
|
|
bases=("wagtailcore.page",),
|
|
),
|
|
migrations.CreateModel(
|
|
name="COFRootPage",
|
|
fields=[
|
|
(
|
|
"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"
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"verbose_name": "Racine site du COF",
|
|
"verbose_name_plural": "Racines site du COF",
|
|
},
|
|
bases=("wagtailcore.page", gestioncof.cms.models.COFActuIndexMixin),
|
|
),
|
|
]
|