From 223a12964b1ac85aa2c0bf7c6b678a258c24e627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexa=20Valentov=C3=A1?= <git@imaniti.org> Date: Tue, 14 Jan 2025 12:19:16 +0100 Subject: [PATCH] run hooks --- ...tricthomepage_menu_button_name_and_more.py | 26 +++++++++++---- elections/blocks.py | 5 +-- ...tionshomepage_menu_button_name_and_more.py | 26 +++++++++++---- main/blocks.py | 10 +++--- ..._mainhomepage_menu_button_name_and_more.py | 26 +++++++++++---- ...homepage_popout_button_content_and_more.py | 33 ++++++++++++++----- ...lter_mainhomepage_popout_button_content.py | 22 ++++++++++--- ...lter_uniwebhomepage_menu_button_content.py | 22 ++++++++++--- ...lter_uniwebhomepage_menu_button_content.py | 22 ++++++++++--- 9 files changed, 142 insertions(+), 50 deletions(-) diff --git a/district/migrations/0306_remove_districthomepage_menu_button_name_and_more.py b/district/migrations/0306_remove_districthomepage_menu_button_name_and_more.py index e24dd4f5..44f5b317 100644 --- a/district/migrations/0306_remove_districthomepage_menu_button_name_and_more.py +++ b/district/migrations/0306_remove_districthomepage_menu_button_name_and_more.py @@ -5,19 +5,31 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('district', '0305_alter_districtcustompage_options'), + ("district", "0305_alter_districtcustompage_options"), ] operations = [ migrations.RemoveField( - model_name='districthomepage', - name='menu_button_name', + model_name="districthomepage", + name="menu_button_name", ), migrations.AlterField( - model_name='districthomepage', - name='menu_button_content', - field=wagtail.fields.StreamField([('navbar_menu_item', 2)], blank=True, block_lookup={0: ('wagtail.blocks.URLBlock', (), {'label': 'Odkaz tlaÄŤĂtka'}), 1: ('wagtail.blocks.CharBlock', (), {'label': 'Text tlaÄŤĂtka'}), 2: ('wagtail.blocks.StructBlock', [[('button_link', 0), ('button_text', 1)]], {})}, verbose_name='ZvĂ˝raznÄ›ná tlaÄŤĂtka'), + model_name="districthomepage", + name="menu_button_content", + field=wagtail.fields.StreamField( + [("navbar_menu_item", 2)], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.URLBlock", (), {"label": "Odkaz tlaÄŤĂtka"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Text tlaÄŤĂtka"}), + 2: ( + "wagtail.blocks.StructBlock", + [[("button_link", 0), ("button_text", 1)]], + {}, + ), + }, + verbose_name="ZvĂ˝raznÄ›ná tlaÄŤĂtka", + ), ), ] diff --git a/elections/blocks.py b/elections/blocks.py index 6c518045..4356b829 100644 --- a/elections/blocks.py +++ b/elections/blocks.py @@ -10,8 +10,9 @@ from wagtail.images.blocks import ImageChooserBlock from shared.blocks import CandidateBlock as SharedCandidateBlockMixin from shared.blocks import CandidateListBlock as SharedCandidateListBlockMixin -from shared.blocks import \ - CandidateSecondaryListBlock as SharedCandidateSecondaryListBlockMixin +from shared.blocks import ( + CandidateSecondaryListBlock as SharedCandidateSecondaryListBlockMixin, +) from shared.blocks import SecondaryCandidateBlock as SharedSecondaryCandidateBlockMixin diff --git a/elections/migrations/0064_remove_electionshomepage_menu_button_name_and_more.py b/elections/migrations/0064_remove_electionshomepage_menu_button_name_and_more.py index a18df670..89b52ec8 100644 --- a/elections/migrations/0064_remove_electionshomepage_menu_button_name_and_more.py +++ b/elections/migrations/0064_remove_electionshomepage_menu_button_name_and_more.py @@ -5,19 +5,31 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('elections', '0063_alter_electionssimplepage_options'), + ("elections", "0063_alter_electionssimplepage_options"), ] operations = [ migrations.RemoveField( - model_name='electionshomepage', - name='menu_button_name', + model_name="electionshomepage", + name="menu_button_name", ), migrations.AlterField( - model_name='electionshomepage', - name='menu_button_content', - field=wagtail.fields.StreamField([('navbar_menu_item', 2)], blank=True, block_lookup={0: ('wagtail.blocks.URLBlock', (), {'label': 'Odkaz tlaÄŤĂtka'}), 1: ('wagtail.blocks.CharBlock', (), {'label': 'Text tlaÄŤĂtka'}), 2: ('wagtail.blocks.StructBlock', [[('button_link', 0), ('button_text', 1)]], {})}, verbose_name='ZvĂ˝raznÄ›ná tlaÄŤĂtka'), + model_name="electionshomepage", + name="menu_button_content", + field=wagtail.fields.StreamField( + [("navbar_menu_item", 2)], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.URLBlock", (), {"label": "Odkaz tlaÄŤĂtka"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Text tlaÄŤĂtka"}), + 2: ( + "wagtail.blocks.StructBlock", + [[("button_link", 0), ("button_text", 1)]], + {}, + ), + }, + verbose_name="ZvĂ˝raznÄ›ná tlaÄŤĂtka", + ), ), ] diff --git a/main/blocks.py b/main/blocks.py index dc9d7f8c..257ba5ba 100644 --- a/main/blocks.py +++ b/main/blocks.py @@ -13,8 +13,9 @@ from wagtail.images.blocks import ImageChooserBlock from shared.blocks import CandidateBlock as SharedCandidateBlockMixin from shared.blocks import CandidateListBlock from shared.blocks import CandidateListBlock as SharedCandidateListBlockMixin -from shared.blocks import \ - CandidateSecondaryListBlock as SharedCandidateSecondaryListBlockMixin +from shared.blocks import ( + CandidateSecondaryListBlock as SharedCandidateSecondaryListBlockMixin, +) from shared.blocks import ( CardLinkBlockMixin, CardLinkWithHeadlineBlockMixin, @@ -27,8 +28,9 @@ from shared.blocks import ( ProgramGroupBlockMixin, ) from shared.blocks import ProgramGroupBlockPopout as SharedProgramGroupBlockPopout -from shared.blocks import \ - ProgramGroupWithCandidatesBlock as SharedProgramGroupWithCandidatesBlockMixin +from shared.blocks import ( + ProgramGroupWithCandidatesBlock as SharedProgramGroupWithCandidatesBlockMixin, +) from shared.blocks import SecondaryCandidateBlock as SharedSecondaryCandidateBlockMixin from shared.blocks import StreamBlock, TeamBlockMixin diff --git a/main/migrations/0141_remove_mainhomepage_menu_button_name_and_more.py b/main/migrations/0141_remove_mainhomepage_menu_button_name_and_more.py index 554178e3..05ffc103 100644 --- a/main/migrations/0141_remove_mainhomepage_menu_button_name_and_more.py +++ b/main/migrations/0141_remove_mainhomepage_menu_button_name_and_more.py @@ -5,19 +5,31 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('main', '0140_maincareerpage_closing_date_and_more'), + ("main", "0140_maincareerpage_closing_date_and_more"), ] operations = [ migrations.RemoveField( - model_name='mainhomepage', - name='menu_button_name', + model_name="mainhomepage", + name="menu_button_name", ), migrations.AlterField( - model_name='mainhomepage', - name='menu_button_content', - field=wagtail.fields.StreamField([('navbar_menu_item', 2)], blank=True, block_lookup={0: ('wagtail.blocks.URLBlock', (), {'label': 'Odkaz tlaÄŤĂtka'}), 1: ('wagtail.blocks.CharBlock', (), {'label': 'Text tlaÄŤĂtka'}), 2: ('wagtail.blocks.StructBlock', [[('button_link', 0), ('button_text', 1)]], {})}, verbose_name='ZvĂ˝raznÄ›ná tlaÄŤĂtka'), + model_name="mainhomepage", + name="menu_button_content", + field=wagtail.fields.StreamField( + [("navbar_menu_item", 2)], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.URLBlock", (), {"label": "Odkaz tlaÄŤĂtka"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Text tlaÄŤĂtka"}), + 2: ( + "wagtail.blocks.StructBlock", + [[("button_link", 0), ("button_text", 1)]], + {}, + ), + }, + verbose_name="ZvĂ˝raznÄ›ná tlaÄŤĂtka", + ), ), ] diff --git a/main/migrations/0142_mainhomepage_popout_button_content_and_more.py b/main/migrations/0142_mainhomepage_popout_button_content_and_more.py index d6a803a3..f0bda6a0 100644 --- a/main/migrations/0142_mainhomepage_popout_button_content_and_more.py +++ b/main/migrations/0142_mainhomepage_popout_button_content_and_more.py @@ -5,20 +5,37 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('main', '0141_remove_mainhomepage_menu_button_name_and_more'), + ("main", "0141_remove_mainhomepage_menu_button_name_and_more"), ] operations = [ migrations.AddField( - model_name='mainhomepage', - name='popout_button_content', - field=wagtail.fields.StreamField([('navbar_menu_item', 2)], blank=True, block_lookup={0: ('wagtail.blocks.URLBlock', (), {'label': 'Odkaz tlaÄŤĂtka'}), 1: ('wagtail.blocks.CharBlock', (), {'label': 'Text tlaÄŤĂtka'}), 2: ('wagtail.blocks.StructBlock', [[('button_link', 0), ('button_text', 1)]], {})}, verbose_name='ZvĂ˝raznÄ›ná tlaÄŤĂtka'), + model_name="mainhomepage", + name="popout_button_content", + field=wagtail.fields.StreamField( + [("navbar_menu_item", 2)], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.URLBlock", (), {"label": "Odkaz tlaÄŤĂtka"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Text tlaÄŤĂtka"}), + 2: ( + "wagtail.blocks.StructBlock", + [[("button_link", 0), ("button_text", 1)]], + {}, + ), + }, + verbose_name="ZvĂ˝raznÄ›ná tlaÄŤĂtka", + ), ), migrations.AddField( - model_name='mainhomepage', - name='popout_button_name', - field=models.CharField(blank=True, max_length=16, null=True, verbose_name='Název vyskakovacĂho tlaÄŤĂtka'), + model_name="mainhomepage", + name="popout_button_name", + field=models.CharField( + blank=True, + max_length=16, + null=True, + verbose_name="Název vyskakovacĂho tlaÄŤĂtka", + ), ), ] diff --git a/main/migrations/0143_alter_mainhomepage_popout_button_content.py b/main/migrations/0143_alter_mainhomepage_popout_button_content.py index 6cfbcd24..4e4fb82e 100644 --- a/main/migrations/0143_alter_mainhomepage_popout_button_content.py +++ b/main/migrations/0143_alter_mainhomepage_popout_button_content.py @@ -5,15 +5,27 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('main', '0142_mainhomepage_popout_button_content_and_more'), + ("main", "0142_mainhomepage_popout_button_content_and_more"), ] operations = [ migrations.AlterField( - model_name='mainhomepage', - name='popout_button_content', - field=wagtail.fields.StreamField([('navbar_menu_item', 2)], blank=True, block_lookup={0: ('wagtail.blocks.URLBlock', (), {'label': 'Odkaz tlaÄŤĂtka'}), 1: ('wagtail.blocks.CharBlock', (), {'label': 'Text tlaÄŤĂtka'}), 2: ('wagtail.blocks.StructBlock', [[('button_link', 0), ('button_text', 1)]], {})}, verbose_name='Obsah vyskakovacĂho tlaÄŤĂtka'), + model_name="mainhomepage", + name="popout_button_content", + field=wagtail.fields.StreamField( + [("navbar_menu_item", 2)], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.URLBlock", (), {"label": "Odkaz tlaÄŤĂtka"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Text tlaÄŤĂtka"}), + 2: ( + "wagtail.blocks.StructBlock", + [[("button_link", 0), ("button_text", 1)]], + {}, + ), + }, + verbose_name="Obsah vyskakovacĂho tlaÄŤĂtka", + ), ), ] diff --git a/uniweb/migrations/0115_alter_uniwebhomepage_menu_button_content.py b/uniweb/migrations/0115_alter_uniwebhomepage_menu_button_content.py index 8b00f38f..003467d2 100644 --- a/uniweb/migrations/0115_alter_uniwebhomepage_menu_button_content.py +++ b/uniweb/migrations/0115_alter_uniwebhomepage_menu_button_content.py @@ -5,15 +5,27 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('uniweb', '0114_auto_20241122_1238'), + ("uniweb", "0114_auto_20241122_1238"), ] operations = [ migrations.AlterField( - model_name='uniwebhomepage', - name='menu_button_content', - field=wagtail.fields.StreamField([('navbar_menu_item', 2)], blank=True, block_lookup={0: ('wagtail.blocks.URLBlock', (), {'label': 'Odkaz tlaÄŤĂtka'}), 1: ('wagtail.blocks.CharBlock', (), {'label': 'Text tlaÄŤĂtka'}), 2: ('wagtail.blocks.StructBlock', [[('button_link', 0), ('button_text', 1)]], {})}, verbose_name='ZvĂ˝raznÄ›ná tlaÄŤĂtka'), + model_name="uniwebhomepage", + name="menu_button_content", + field=wagtail.fields.StreamField( + [("navbar_menu_item", 2)], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.URLBlock", (), {"label": "Odkaz tlaÄŤĂtka"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Text tlaÄŤĂtka"}), + 2: ( + "wagtail.blocks.StructBlock", + [[("button_link", 0), ("button_text", 1)]], + {}, + ), + }, + verbose_name="ZvĂ˝raznÄ›ná tlaÄŤĂtka", + ), ), ] diff --git a/uniweb/migrations/0116_alter_uniwebhomepage_menu_button_content.py b/uniweb/migrations/0116_alter_uniwebhomepage_menu_button_content.py index 07958695..e4e09f24 100644 --- a/uniweb/migrations/0116_alter_uniwebhomepage_menu_button_content.py +++ b/uniweb/migrations/0116_alter_uniwebhomepage_menu_button_content.py @@ -5,15 +5,27 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('uniweb', '0115_alter_uniwebhomepage_menu_button_content'), + ("uniweb", "0115_alter_uniwebhomepage_menu_button_content"), ] operations = [ migrations.AlterField( - model_name='uniwebhomepage', - name='menu_button_content', - field=wagtail.fields.StreamField([('navbar_menu_item', 2)], blank=True, block_lookup={0: ('wagtail.blocks.URLBlock', (), {'label': 'Odkaz tlaÄŤĂtka'}), 1: ('wagtail.blocks.CharBlock', (), {'label': 'Text tlaÄŤĂtka'}), 2: ('wagtail.blocks.StructBlock', [[('button_link', 0), ('button_text', 1)]], {})}, verbose_name='Obsah tlaÄŤĂtka pro zapojenĂ'), + model_name="uniwebhomepage", + name="menu_button_content", + field=wagtail.fields.StreamField( + [("navbar_menu_item", 2)], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.URLBlock", (), {"label": "Odkaz tlaÄŤĂtka"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Text tlaÄŤĂtka"}), + 2: ( + "wagtail.blocks.StructBlock", + [[("button_link", 0), ("button_text", 1)]], + {}, + ), + }, + verbose_name="Obsah tlaÄŤĂtka pro zapojenĂ", + ), ), ] -- GitLab