2017-05-30 20:44:30 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2018-10-06 12:35:49 +02:00
|
|
|
import django.db.models.deletion
|
2019-02-04 22:50:27 +01:00
|
|
|
import wagtail.core.blocks
|
|
|
|
import wagtail.core.fields
|
|
|
|
import wagtail.snippets.blocks
|
2018-10-06 12:35:49 +02:00
|
|
|
from django.db import migrations, models
|
|
|
|
|
2017-06-12 01:51:10 +02:00
|
|
|
import kfet.cms.models
|
2017-05-30 20:44:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2018-10-06 12:35:49 +02:00
|
|
|
("wagtailcore", "0033_remove_golive_expiry_help_text"),
|
|
|
|
("wagtailimages", "0019_delete_filter"),
|
2017-05-30 20:44:30 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2018-10-06 12:35:49 +02:00
|
|
|
name="KFetPage",
|
2017-05-30 20:44:30 +02:00
|
|
|
fields=[
|
2018-10-06 12:35:49 +02:00
|
|
|
(
|
|
|
|
"page_ptr",
|
|
|
|
models.OneToOneField(
|
|
|
|
serialize=False,
|
|
|
|
primary_key=True,
|
|
|
|
parent_link=True,
|
|
|
|
auto_created=True,
|
|
|
|
to="wagtailcore.Page",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"no_header",
|
|
|
|
models.BooleanField(
|
|
|
|
verbose_name="Sans en-tête",
|
|
|
|
help_text="Coché, l'en-tête (avec le titre) de la page n'est pas affiché.",
|
|
|
|
default=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"content",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.fields.StreamField(
|
2018-10-06 12:35:49 +02:00
|
|
|
(
|
|
|
|
(
|
|
|
|
"rich",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.RichTextBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
label="Éditeur"
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("carte", kfet.cms.models.MenuBlock()),
|
|
|
|
(
|
|
|
|
"group_team",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.StructBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
(
|
|
|
|
(
|
|
|
|
"show_only",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.IntegerBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.",
|
|
|
|
required=False,
|
|
|
|
label="Montrer seulement",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"members",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.ListBlock(
|
|
|
|
wagtail.snippets.blocks.SnippetChooserBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
kfet.cms.models.MemberTeam
|
|
|
|
),
|
|
|
|
classname="team-group",
|
|
|
|
label="K-Fêt-eux-ses",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"group",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.StreamBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
(
|
|
|
|
(
|
|
|
|
"rich",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.RichTextBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
label="Éditeur"
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("carte", kfet.cms.models.MenuBlock()),
|
|
|
|
(
|
|
|
|
"group_team",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.StructBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
(
|
|
|
|
(
|
|
|
|
"show_only",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.IntegerBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.",
|
|
|
|
required=False,
|
|
|
|
label="Montrer seulement",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"members",
|
2019-02-04 22:50:27 +01:00
|
|
|
wagtail.core.blocks.ListBlock(
|
|
|
|
wagtail.snippets.blocks.SnippetChooserBlock(
|
2018-10-06 12:35:49 +02:00
|
|
|
kfet.cms.models.MemberTeam
|
|
|
|
),
|
|
|
|
classname="team-group",
|
|
|
|
label="K-Fêt-eux-ses",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
label="Contenu groupé",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
verbose_name="Contenu",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"layout",
|
|
|
|
models.CharField(
|
|
|
|
max_length=255,
|
|
|
|
choices=[
|
|
|
|
(
|
|
|
|
"kfet/base_col_1.html",
|
|
|
|
"Une colonne : centrée sur la page",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"kfet/base_col_2.html",
|
|
|
|
"Deux colonnes : fixe à gauche, contenu à droite",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"kfet/base_col_mult.html",
|
|
|
|
"Contenu scindé sur plusieurs colonnes",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
help_text="Comment cette page devrait être affichée ?",
|
|
|
|
verbose_name="Template",
|
|
|
|
default="kfet/base_col_mult.html",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"main_size",
|
|
|
|
models.CharField(
|
|
|
|
max_length=255,
|
|
|
|
blank=True,
|
|
|
|
verbose_name="Taille de la colonne de contenu",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"col_count",
|
|
|
|
models.CharField(
|
|
|
|
max_length=255,
|
|
|
|
blank=True,
|
|
|
|
verbose_name="Nombre de colonnes",
|
|
|
|
help_text="S'applique au page dont le contenu est scindé sur plusieurs colonnes",
|
|
|
|
),
|
|
|
|
),
|
2017-05-30 20:44:30 +02:00
|
|
|
],
|
|
|
|
options={
|
2018-10-06 12:35:49 +02:00
|
|
|
"verbose_name": "page K-Fêt",
|
|
|
|
"verbose_name_plural": "pages K-Fêt",
|
2017-05-30 20:44:30 +02:00
|
|
|
},
|
2018-10-06 12:35:49 +02:00
|
|
|
bases=("wagtailcore.page",),
|
2017-05-30 20:44:30 +02:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2018-10-06 12:35:49 +02:00
|
|
|
name="MemberTeam",
|
2017-05-30 20:44:30 +02:00
|
|
|
fields=[
|
2018-10-06 12:35:49 +02:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
auto_created=True,
|
|
|
|
serialize=False,
|
|
|
|
primary_key=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"first_name",
|
|
|
|
models.CharField(
|
|
|
|
blank=True, max_length=255, verbose_name="Prénom", default=""
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"last_name",
|
|
|
|
models.CharField(
|
|
|
|
blank=True, max_length=255, verbose_name="Nom", default=""
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"nick_name",
|
|
|
|
models.CharField(
|
|
|
|
verbose_name="Alias", blank=True, default="", max_length=255
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"photo",
|
|
|
|
models.ForeignKey(
|
|
|
|
null=True,
|
|
|
|
related_name="+",
|
|
|
|
on_delete=django.db.models.deletion.SET_NULL,
|
|
|
|
verbose_name="Photo",
|
|
|
|
blank=True,
|
|
|
|
to="wagtailimages.Image",
|
|
|
|
),
|
|
|
|
),
|
2017-05-30 20:44:30 +02:00
|
|
|
],
|
2018-10-06 12:35:49 +02:00
|
|
|
options={"verbose_name": "K-Fêt-eux-se"},
|
2017-05-30 20:44:30 +02:00
|
|
|
),
|
|
|
|
]
|