From 229b6e55f521ecce4fb1b8554d933f03dcbab32b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Fri, 20 Dec 2019 17:29:35 +0100 Subject: [PATCH 1/2] cofsite: make club links optional --- .../0003_directory_entry_optional_links.py | 107 ++++++++++++++++++ gestioncof/cms/models.py | 3 +- 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 gestioncof/cms/migrations/0003_directory_entry_optional_links.py diff --git a/gestioncof/cms/migrations/0003_directory_entry_optional_links.py b/gestioncof/cms/migrations/0003_directory_entry_optional_links.py new file mode 100644 index 00000000..10cf5c5e --- /dev/null +++ b/gestioncof/cms/migrations/0003_directory_entry_optional_links.py @@ -0,0 +1,107 @@ +# Generated by Django 2.2.8 on 2019-12-20 16:22 + +import wagtail.core.blocks +import wagtail.core.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("cofcms", "0002_auto_20190523_1521"), + ] + + operations = [ + migrations.AlterField( + model_name="cofdirectoryentrypage", + name="links", + field=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()), + ] + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="cofdirectoryentrypage", + name="links_en", + field=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()), + ] + ), + ), + ], + blank=True, + null=True, + ), + ), + migrations.AlterField( + model_name="cofdirectoryentrypage", + name="links_fr", + field=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()), + ] + ), + ), + ], + blank=True, + null=True, + ), + ), + ] diff --git a/gestioncof/cms/models.py b/gestioncof/cms/models.py index 0da0f687..3bb757b7 100644 --- a/gestioncof/cms/models.py +++ b/gestioncof/cms/models.py @@ -182,7 +182,8 @@ class COFDirectoryEntryPage(Page): ] ), ), - ] + ], + blank=True, ) image = models.ForeignKey( From 2e4d7101ce4f9db42ec07a50a57598c63309f3fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sun, 22 Dec 2019 23:52:53 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8004f215..178b810c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Liste des changements notables dans GestioCOF depuis la version 0.1 (septembre ## Upcoming +- Nouveau site du COF : les liens sont optionnels dans les descriptions de clubs - Mise à jour du lien vers le calendire de la K-Fêt sur la page d'accueil - Certaines opérations sont à nouveau accessibles depuis la session partagée K-Fêt.