Black + isort
This commit is contained in:
parent
0f1e05acdd
commit
1c45dd833d
|
@ -2,13 +2,14 @@
|
||||||
# Generated by Django 1.11.18 on 2019-02-04 20:45
|
# Generated by Django 1.11.18 on 2019-02-04 20:45
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
import gestioncof.cms.models
|
|
||||||
import wagtail.contrib.routable_page.models
|
import wagtail.contrib.routable_page.models
|
||||||
import wagtail.core.blocks
|
import wagtail.core.blocks
|
||||||
import wagtail.core.fields
|
import wagtail.core.fields
|
||||||
import wagtail.images.blocks
|
import wagtail.images.blocks
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import gestioncof.cms.models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
@ -16,103 +17,457 @@ class Migration(migrations.Migration):
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('wagtailimages', '0021_image_file_hash'),
|
("wagtailimages", "0021_image_file_hash"),
|
||||||
('wagtailcore', '0040_page_draft_title'),
|
("wagtailcore", "0040_page_draft_title"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='COFActuIndexPage',
|
name="COFActuIndexPage",
|
||||||
fields=[
|
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')),
|
(
|
||||||
|
"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={
|
options={
|
||||||
'verbose_name': 'Index des actualités',
|
"verbose_name": "Index des actualités",
|
||||||
'verbose_name_plural': 'Indexs des actualités',
|
"verbose_name_plural": "Indexs des actualités",
|
||||||
},
|
},
|
||||||
bases=('wagtailcore.page', gestioncof.cms.models.COFActuIndexMixin),
|
bases=("wagtailcore.page", gestioncof.cms.models.COFActuIndexMixin),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='COFActuPage',
|
name="COFActuPage",
|
||||||
fields=[
|
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')),
|
"page_ptr",
|
||||||
('chapo_fr', models.TextField(blank=True, null=True, verbose_name='Description rapide')),
|
models.OneToOneField(
|
||||||
('chapo_en', models.TextField(blank=True, null=True, verbose_name='Description rapide')),
|
auto_created=True,
|
||||||
('body', wagtail.core.fields.RichTextField(verbose_name='Contenu')),
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
('body_fr', wagtail.core.fields.RichTextField(null=True, verbose_name='Contenu')),
|
parent_link=True,
|
||||||
('body_en', wagtail.core.fields.RichTextField(null=True, verbose_name='Contenu')),
|
primary_key=True,
|
||||||
('is_event', models.BooleanField(default=True, verbose_name='Évènement')),
|
serialize=False,
|
||||||
('date_start', models.DateTimeField(verbose_name='Date et heure de début')),
|
to="wagtailcore.Page",
|
||||||
('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')),
|
(
|
||||||
|
"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={
|
options={"verbose_name": "Actualité", "verbose_name_plural": "Actualités"},
|
||||||
'verbose_name': 'Actualité',
|
bases=(
|
||||||
'verbose_name_plural': 'Actualités',
|
wagtail.contrib.routable_page.models.RoutablePageMixin,
|
||||||
},
|
"wagtailcore.page",
|
||||||
bases=(wagtail.contrib.routable_page.models.RoutablePageMixin, 'wagtailcore.page'),
|
),
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='COFDirectoryEntryPage',
|
name="COFDirectoryEntryPage",
|
||||||
fields=[
|
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')),
|
"page_ptr",
|
||||||
('body_fr', wagtail.core.fields.RichTextField(null=True, verbose_name='Description')),
|
models.OneToOneField(
|
||||||
('body_en', wagtail.core.fields.RichTextField(null=True, verbose_name='Description')),
|
auto_created=True,
|
||||||
('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())]))])),
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
('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)),
|
parent_link=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)),
|
primary_key=True,
|
||||||
('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='Image')),
|
serialize=False,
|
||||||
],
|
to="wagtailcore.Page",
|
||||||
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(
|
("body", wagtail.core.fields.RichTextField(verbose_name="Description")),
|
||||||
name='COFPage',
|
(
|
||||||
fields=[
|
"body_fr",
|
||||||
('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')),
|
wagtail.core.fields.RichTextField(
|
||||||
('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)'))]))])),
|
null=True, verbose_name="Description"
|
||||||
('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={
|
"body_en",
|
||||||
'verbose_name': 'Page normale COF',
|
wagtail.core.fields.RichTextField(
|
||||||
'verbose_name_plural': 'Pages normales COF',
|
null=True, verbose_name="Description"
|
||||||
},
|
),
|
||||||
bases=('wagtailcore.page',),
|
),
|
||||||
|
(
|
||||||
|
"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()),
|
||||||
|
]
|
||||||
),
|
),
|
||||||
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')),
|
"links_fr",
|
||||||
('introduction_en', wagtail.core.fields.RichTextField(null=True, verbose_name='Introduction')),
|
wagtail.core.fields.StreamField(
|
||||||
],
|
[
|
||||||
options={
|
(
|
||||||
'verbose_name': 'Racine site du COF',
|
"lien",
|
||||||
'verbose_name_plural': 'Racines site du COF',
|
wagtail.core.blocks.StructBlock(
|
||||||
},
|
[
|
||||||
bases=('wagtailcore.page', gestioncof.cms.models.COFActuIndexMixin),
|
(
|
||||||
|
"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),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
|
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from wagtail.contrib.routable_page.models import RoutablePageMixin, route
|
|
||||||
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel
|
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel
|
||||||
|
from wagtail.contrib.routable_page.models import RoutablePageMixin, route
|
||||||
from wagtail.core import blocks
|
from wagtail.core import blocks
|
||||||
from wagtail.core.fields import RichTextField, StreamField
|
from wagtail.core.fields import RichTextField, StreamField
|
||||||
from wagtail.core.models import Page
|
from wagtail.core.models import Page
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Migration(migrations.Migration):
|
||||||
"no_header",
|
"no_header",
|
||||||
models.BooleanField(
|
models.BooleanField(
|
||||||
verbose_name="Sans en-tête",
|
verbose_name="Sans en-tête",
|
||||||
help_text="Coché, l'en-tête (avec le titre) de la page n'est pas affiché.",
|
help_text="Coché, l'en-tête (avec le titre) de la page n'est pas affiché.", # noqa
|
||||||
default=False,
|
default=False,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -46,9 +46,7 @@ class Migration(migrations.Migration):
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
"rich",
|
"rich",
|
||||||
wagtail.core.blocks.RichTextBlock(
|
wagtail.core.blocks.RichTextBlock(label="Éditeur"),
|
||||||
label="Éditeur"
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
("carte", kfet.cms.models.MenuBlock()),
|
("carte", kfet.cms.models.MenuBlock()),
|
||||||
(
|
(
|
||||||
|
@ -58,7 +56,7 @@ class Migration(migrations.Migration):
|
||||||
(
|
(
|
||||||
"show_only",
|
"show_only",
|
||||||
wagtail.core.blocks.IntegerBlock(
|
wagtail.core.blocks.IntegerBlock(
|
||||||
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.",
|
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.", # noqa
|
||||||
required=False,
|
required=False,
|
||||||
label="Montrer seulement",
|
label="Montrer seulement",
|
||||||
),
|
),
|
||||||
|
@ -66,7 +64,7 @@ class Migration(migrations.Migration):
|
||||||
(
|
(
|
||||||
"members",
|
"members",
|
||||||
wagtail.core.blocks.ListBlock(
|
wagtail.core.blocks.ListBlock(
|
||||||
wagtail.snippets.blocks.SnippetChooserBlock(
|
wagtail.snippets.blocks.SnippetChooserBlock( # noqa
|
||||||
kfet.cms.models.MemberTeam
|
kfet.cms.models.MemberTeam
|
||||||
),
|
),
|
||||||
classname="team-group",
|
classname="team-group",
|
||||||
|
@ -93,8 +91,8 @@ class Migration(migrations.Migration):
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
"show_only",
|
"show_only",
|
||||||
wagtail.core.blocks.IntegerBlock(
|
wagtail.core.blocks.IntegerBlock( # noqa
|
||||||
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.",
|
help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.", # noqa
|
||||||
required=False,
|
required=False,
|
||||||
label="Montrer seulement",
|
label="Montrer seulement",
|
||||||
),
|
),
|
||||||
|
@ -102,8 +100,8 @@ class Migration(migrations.Migration):
|
||||||
(
|
(
|
||||||
"members",
|
"members",
|
||||||
wagtail.core.blocks.ListBlock(
|
wagtail.core.blocks.ListBlock(
|
||||||
wagtail.snippets.blocks.SnippetChooserBlock(
|
wagtail.snippets.blocks.SnippetChooserBlock( # noqa
|
||||||
kfet.cms.models.MemberTeam
|
kfet.cms.models.MemberTeam # noqa
|
||||||
),
|
),
|
||||||
classname="team-group",
|
classname="team-group",
|
||||||
label="K-Fêt-eux-ses",
|
label="K-Fêt-eux-ses",
|
||||||
|
@ -157,7 +155,7 @@ class Migration(migrations.Migration):
|
||||||
max_length=255,
|
max_length=255,
|
||||||
blank=True,
|
blank=True,
|
||||||
verbose_name="Nombre de colonnes",
|
verbose_name="Nombre de colonnes",
|
||||||
help_text="S'applique au page dont le contenu est scindé sur plusieurs colonnes",
|
help_text="S'applique au page dont le contenu est scindé sur plusieurs colonnes", # noqa
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
from modeltranslation.decorators import register
|
from modeltranslation.decorators import register
|
||||||
from modeltranslation.translator import TranslationOptions
|
from modeltranslation.translator import TranslationOptions
|
||||||
|
|
||||||
from .models import (
|
from .models import KFetPage
|
||||||
KFetPage,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@register(KFetPage)
|
@register(KFetPage)
|
||||||
|
|
Loading…
Reference in a new issue