Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions blog/migrations/0008_alter_blogpage_body.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.2.16 on 2026-10-01 00:41

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('blog', '0007_customblogpage'),
]

operations = [
migrations.AlterField(
model_name='blogpage',
name='body',
field=wagtail.fields.StreamField([('heading', 0), ('paragraph', 1), ('image', 2), ('quote', 3), ('embed', 4), ('iframe', 8), ('callout', 10), ('card_grid', 17), ('ambassador_apply', 21), ('donate', 24), ('html', 25)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'form_classname': 'title', 'template': 'core/blocks/heading.html'}), 1: ('wagtail.blocks.RichTextBlock', (), {}), 2: ('wagtail.images.blocks.ImageBlock', [], {}), 3: ('wagtail.blocks.BlockQuoteBlock', (), {}), 4: ('wagtail.embeds.blocks.EmbedBlock', (), {}), 5: ('wagtail.blocks.CharBlock', (), {'help_text': 'Accessible title for the iframe.'}), 6: ('wagtail.blocks.URLBlock', (), {}), 7: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('56.25', '16:9'), ('75', '4:3'), ('100', '1:1')]}), 8: ('wagtail.blocks.StructBlock', [[('title', 5), ('src', 6), ('aspect_ratio', 7)]], {}), 9: ('wagtail.blocks.CharBlock', (), {'required': False}), 10: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 1)]], {}), 11: ('wagtail.blocks.CharBlock', (), {}), 12: ('wagtail.blocks.RichTextBlock', (), {'required': False}), 13: ('wagtail.blocks.StructBlock', [[('heading', 11), ('text', 12), ('link_url', 9), ('link_text', 9)]], {}), 14: ('wagtail.blocks.ListBlock', (13,), {}), 15: ('wagtail.blocks.CharBlock', (), {'help_text': 'Optional link shown below the grid.', 'required': False}), 16: ('wagtail.blocks.CharBlock', (), {'default': 'Learn More', 'required': False}), 17: ('wagtail.blocks.StructBlock', [[('heading', 9), ('cards', 14), ('link_url', 15), ('link_text', 16)]], {}), 18: ('wagtail.blocks.CharBlock', (), {'default': 'Apply', 'required': False}), 19: ('wagtail.blocks.RichTextBlock', (), {'help_text': 'Optional copy shown above the button.', 'required': False}), 20: ('wagtail.blocks.CharBlock', (), {'default': 'Apply Now'}), 21: ('wagtail.blocks.StructBlock', [[('heading', 18), ('text', 19), ('button_text', 20)]], {}), 22: ('wagtail.blocks.CharBlock', (), {'help_text': "Label recorded with each gift made here (e.g. 'pycon-2027'), for aligning funds raised.", 'max_length': 100, 'required': False}), 23: ('wagtail.blocks.CharBlock', (), {'default': '15,25,50,100,250,500', 'help_text': 'Comma-separated suggested amounts in dollars.', 'required': False}), 24: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 12), ('tag', 22), ('amounts', 23)]], {}), 25: ('wagtail.blocks.RawHTMLBlock', (), {'help_text': 'Raw HTML — available to editors with the required permission only.'})}),
),
]
19 changes: 19 additions & 0 deletions blog/migrations/0009_alter_blogpage_body.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.2.16 on 2026-10-01 01:03

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('blog', '0008_alter_blogpage_body'),
]

operations = [
migrations.AlterField(
model_name='blogpage',
name='body',
field=wagtail.fields.StreamField([('heading', 0), ('paragraph', 1), ('image', 2), ('quote', 3), ('embed', 4), ('iframe', 8), ('callout', 10), ('card_grid', 17), ('ambassador_apply', 21), ('donate', 25), ('html', 26)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'form_classname': 'title', 'template': 'core/blocks/heading.html'}), 1: ('wagtail.blocks.RichTextBlock', (), {}), 2: ('wagtail.images.blocks.ImageBlock', [], {}), 3: ('wagtail.blocks.BlockQuoteBlock', (), {}), 4: ('wagtail.embeds.blocks.EmbedBlock', (), {}), 5: ('wagtail.blocks.CharBlock', (), {'help_text': 'Accessible title for the iframe.'}), 6: ('wagtail.blocks.URLBlock', (), {}), 7: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('56.25', '16:9'), ('75', '4:3'), ('100', '1:1')]}), 8: ('wagtail.blocks.StructBlock', [[('title', 5), ('src', 6), ('aspect_ratio', 7)]], {}), 9: ('wagtail.blocks.CharBlock', (), {'required': False}), 10: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 1)]], {}), 11: ('wagtail.blocks.CharBlock', (), {}), 12: ('wagtail.blocks.RichTextBlock', (), {'required': False}), 13: ('wagtail.blocks.StructBlock', [[('heading', 11), ('text', 12), ('link_url', 9), ('link_text', 9)]], {}), 14: ('wagtail.blocks.ListBlock', (13,), {}), 15: ('wagtail.blocks.CharBlock', (), {'help_text': 'Optional link shown below the grid.', 'required': False}), 16: ('wagtail.blocks.CharBlock', (), {'default': 'Learn More', 'required': False}), 17: ('wagtail.blocks.StructBlock', [[('heading', 9), ('cards', 14), ('link_url', 15), ('link_text', 16)]], {}), 18: ('wagtail.blocks.CharBlock', (), {'default': 'Apply', 'required': False}), 19: ('wagtail.blocks.RichTextBlock', (), {'help_text': 'Optional copy shown above the button.', 'required': False}), 20: ('wagtail.blocks.CharBlock', (), {'default': 'Apply Now'}), 21: ('wagtail.blocks.StructBlock', [[('heading', 18), ('text', 19), ('button_text', 20)]], {}), 22: ('wagtail.blocks.CharBlock', (), {'help_text': "Tag(s) added to each supporter who gives here, comma-separated (e.g. 'pycon-2027').", 'max_length': 100, 'required': False}), 23: ('wagtail.blocks.CharBlock', (), {'help_text': 'CommitChange campaign ID, shown on the campaign page when signed in as an admin.', 'max_length': 20, 'required': False}), 24: ('wagtail.blocks.CharBlock', (), {'default': '15,25,50,100,250,500', 'help_text': 'Comma-separated suggested amounts in dollars.', 'required': False}), 25: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 12), ('tag', 22), ('campaign_id', 23), ('amounts', 24)]], {}), 26: ('wagtail.blocks.RawHTMLBlock', (), {'help_text': 'Raw HTML — available to editors with the required permission only.'})}),
),
]
19 changes: 19 additions & 0 deletions blog/migrations/0010_alter_blogpage_body.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.2.16 on 2026-10-01 01:05

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('blog', '0009_alter_blogpage_body'),
]

operations = [
migrations.AlterField(
model_name='blogpage',
name='body',
field=wagtail.fields.StreamField([('heading', 0), ('paragraph', 1), ('image', 2), ('quote', 3), ('embed', 4), ('iframe', 8), ('callout', 10), ('card_grid', 17), ('ambassador_apply', 21), ('donate', 23), ('html', 24)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'form_classname': 'title', 'template': 'core/blocks/heading.html'}), 1: ('wagtail.blocks.RichTextBlock', (), {}), 2: ('wagtail.images.blocks.ImageBlock', [], {}), 3: ('wagtail.blocks.BlockQuoteBlock', (), {}), 4: ('wagtail.embeds.blocks.EmbedBlock', (), {}), 5: ('wagtail.blocks.CharBlock', (), {'help_text': 'Accessible title for the iframe.'}), 6: ('wagtail.blocks.URLBlock', (), {}), 7: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('56.25', '16:9'), ('75', '4:3'), ('100', '1:1')]}), 8: ('wagtail.blocks.StructBlock', [[('title', 5), ('src', 6), ('aspect_ratio', 7)]], {}), 9: ('wagtail.blocks.CharBlock', (), {'required': False}), 10: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 1)]], {}), 11: ('wagtail.blocks.CharBlock', (), {}), 12: ('wagtail.blocks.RichTextBlock', (), {'required': False}), 13: ('wagtail.blocks.StructBlock', [[('heading', 11), ('text', 12), ('link_url', 9), ('link_text', 9)]], {}), 14: ('wagtail.blocks.ListBlock', (13,), {}), 15: ('wagtail.blocks.CharBlock', (), {'help_text': 'Optional link shown below the grid.', 'required': False}), 16: ('wagtail.blocks.CharBlock', (), {'default': 'Learn More', 'required': False}), 17: ('wagtail.blocks.StructBlock', [[('heading', 9), ('cards', 14), ('link_url', 15), ('link_text', 16)]], {}), 18: ('wagtail.blocks.CharBlock', (), {'default': 'Apply', 'required': False}), 19: ('wagtail.blocks.RichTextBlock', (), {'help_text': 'Optional copy shown above the button.', 'required': False}), 20: ('wagtail.blocks.CharBlock', (), {'default': 'Apply Now'}), 21: ('wagtail.blocks.StructBlock', [[('heading', 18), ('text', 19), ('button_text', 20)]], {}), 22: ('wagtail.blocks.CharBlock', (), {'help_text': "Fund the gifts are designated to (e.g. 'Leadership Summit').", 'max_length': 100, 'required': False}), 23: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 12), ('designation', 22)]], {}), 24: ('wagtail.blocks.RawHTMLBlock', (), {'help_text': 'Raw HTML — available to editors with the required permission only.'})}),
),
]
23 changes: 23 additions & 0 deletions core/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,28 @@ class Meta:
template = "core/blocks/ambassador_apply.html"


class DonateBlock(blocks.StructBlock):
"""Embedded CommitChange donation form.

`designation` goes to CommitChange's `data-designation`, so every gift made
through this form is recorded under that fund and funds raised can be
aligned with it.
"""

heading = blocks.CharBlock(required=False)
text = blocks.RichTextBlock(required=False)
designation = blocks.CharBlock(
required=False,
max_length=100,
help_text="Fund the gifts are designated to (e.g. 'Leadership Summit').",
)

class Meta:
icon = "pick"
label = "Donate form"
template = "core/blocks/donate.html"


class BodyStreamBlock(blocks.StreamBlock):
heading = blocks.CharBlock(form_classname="title", template="core/blocks/heading.html")
paragraph = blocks.RichTextBlock()
Expand All @@ -86,6 +108,7 @@ class BodyStreamBlock(blocks.StreamBlock):
callout = CalloutBlock()
card_grid = CardGridBlock()
ambassador_apply = AmbassadorApplyBlock()
donate = DonateBlock()
html = blocks.RawHTMLBlock(
help_text="Raw HTML — available to editors with the required permission only.",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 5.2.16 on 2026-10-01 00:41

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('events', '0013_alter_eventindexpage_body_alter_eventpage_body'),
]

operations = [
migrations.AlterField(
model_name='eventindexpage',
name='body',
field=wagtail.fields.StreamField([('heading', 0), ('paragraph', 1), ('image', 2), ('quote', 3), ('embed', 4), ('iframe', 8), ('callout', 10), ('card_grid', 17), ('ambassador_apply', 21), ('donate', 24), ('html', 25)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'form_classname': 'title', 'template': 'core/blocks/heading.html'}), 1: ('wagtail.blocks.RichTextBlock', (), {}), 2: ('wagtail.images.blocks.ImageBlock', [], {}), 3: ('wagtail.blocks.BlockQuoteBlock', (), {}), 4: ('wagtail.embeds.blocks.EmbedBlock', (), {}), 5: ('wagtail.blocks.CharBlock', (), {'help_text': 'Accessible title for the iframe.'}), 6: ('wagtail.blocks.URLBlock', (), {}), 7: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('56.25', '16:9'), ('75', '4:3'), ('100', '1:1')]}), 8: ('wagtail.blocks.StructBlock', [[('title', 5), ('src', 6), ('aspect_ratio', 7)]], {}), 9: ('wagtail.blocks.CharBlock', (), {'required': False}), 10: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 1)]], {}), 11: ('wagtail.blocks.CharBlock', (), {}), 12: ('wagtail.blocks.RichTextBlock', (), {'required': False}), 13: ('wagtail.blocks.StructBlock', [[('heading', 11), ('text', 12), ('link_url', 9), ('link_text', 9)]], {}), 14: ('wagtail.blocks.ListBlock', (13,), {}), 15: ('wagtail.blocks.CharBlock', (), {'help_text': 'Optional link shown below the grid.', 'required': False}), 16: ('wagtail.blocks.CharBlock', (), {'default': 'Learn More', 'required': False}), 17: ('wagtail.blocks.StructBlock', [[('heading', 9), ('cards', 14), ('link_url', 15), ('link_text', 16)]], {}), 18: ('wagtail.blocks.CharBlock', (), {'default': 'Apply', 'required': False}), 19: ('wagtail.blocks.RichTextBlock', (), {'help_text': 'Optional copy shown above the button.', 'required': False}), 20: ('wagtail.blocks.CharBlock', (), {'default': 'Apply Now'}), 21: ('wagtail.blocks.StructBlock', [[('heading', 18), ('text', 19), ('button_text', 20)]], {}), 22: ('wagtail.blocks.CharBlock', (), {'help_text': "Label recorded with each gift made here (e.g. 'pycon-2027'), for aligning funds raised.", 'max_length': 100, 'required': False}), 23: ('wagtail.blocks.CharBlock', (), {'default': '15,25,50,100,250,500', 'help_text': 'Comma-separated suggested amounts in dollars.', 'required': False}), 24: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 12), ('tag', 22), ('amounts', 23)]], {}), 25: ('wagtail.blocks.RawHTMLBlock', (), {'help_text': 'Raw HTML — available to editors with the required permission only.'})}),
),
migrations.AlterField(
model_name='eventpage',
name='body',
field=wagtail.fields.StreamField([('heading', 0), ('paragraph', 1), ('image', 2), ('quote', 3), ('embed', 4), ('iframe', 8), ('callout', 10), ('card_grid', 17), ('ambassador_apply', 21), ('donate', 24), ('html', 25)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'form_classname': 'title', 'template': 'core/blocks/heading.html'}), 1: ('wagtail.blocks.RichTextBlock', (), {}), 2: ('wagtail.images.blocks.ImageBlock', [], {}), 3: ('wagtail.blocks.BlockQuoteBlock', (), {}), 4: ('wagtail.embeds.blocks.EmbedBlock', (), {}), 5: ('wagtail.blocks.CharBlock', (), {'help_text': 'Accessible title for the iframe.'}), 6: ('wagtail.blocks.URLBlock', (), {}), 7: ('wagtail.blocks.ChoiceBlock', [], {'choices': [('56.25', '16:9'), ('75', '4:3'), ('100', '1:1')]}), 8: ('wagtail.blocks.StructBlock', [[('title', 5), ('src', 6), ('aspect_ratio', 7)]], {}), 9: ('wagtail.blocks.CharBlock', (), {'required': False}), 10: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 1)]], {}), 11: ('wagtail.blocks.CharBlock', (), {}), 12: ('wagtail.blocks.RichTextBlock', (), {'required': False}), 13: ('wagtail.blocks.StructBlock', [[('heading', 11), ('text', 12), ('link_url', 9), ('link_text', 9)]], {}), 14: ('wagtail.blocks.ListBlock', (13,), {}), 15: ('wagtail.blocks.CharBlock', (), {'help_text': 'Optional link shown below the grid.', 'required': False}), 16: ('wagtail.blocks.CharBlock', (), {'default': 'Learn More', 'required': False}), 17: ('wagtail.blocks.StructBlock', [[('heading', 9), ('cards', 14), ('link_url', 15), ('link_text', 16)]], {}), 18: ('wagtail.blocks.CharBlock', (), {'default': 'Apply', 'required': False}), 19: ('wagtail.blocks.RichTextBlock', (), {'help_text': 'Optional copy shown above the button.', 'required': False}), 20: ('wagtail.blocks.CharBlock', (), {'default': 'Apply Now'}), 21: ('wagtail.blocks.StructBlock', [[('heading', 18), ('text', 19), ('button_text', 20)]], {}), 22: ('wagtail.blocks.CharBlock', (), {'help_text': "Label recorded with each gift made here (e.g. 'pycon-2027'), for aligning funds raised.", 'max_length': 100, 'required': False}), 23: ('wagtail.blocks.CharBlock', (), {'default': '15,25,50,100,250,500', 'help_text': 'Comma-separated suggested amounts in dollars.', 'required': False}), 24: ('wagtail.blocks.StructBlock', [[('heading', 9), ('text', 12), ('tag', 22), ('amounts', 23)]], {}), 25: ('wagtail.blocks.RawHTMLBlock', (), {'help_text': 'Raw HTML — available to editors with the required permission only.'})}),
),
]
Loading
Loading