-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy path0049_tiptaparticlepage.py
More file actions
40 lines (35 loc) · 21.1 KB
/
0049_tiptaparticlepage.py
File metadata and controls
40 lines (35 loc) · 21.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Generated by Django 4.2 on 2026-03-08 07:44
from django.db import migrations, models
import django.db.models.deletion
import images.models
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks
import wagtail.snippets.blocks
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0089_log_entry_data_json_null_to_object'),
('article', '0048_alter_standardarticlepage_content'),
]
operations = [
migrations.CreateModel(
name='TipTapArticlePage',
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')),
('lede', models.TextField(blank=True, default='')),
('body', models.JSONField(blank=True, default=dict)),
],
options={
'verbose_name': 'TipTap Article Page',
'verbose_name_plural': 'TipTap Article Pages',
},
bases=('wagtailcore.page',),
),
migrations.AlterField(
model_name='standardarticlepage',
name='content',
field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('extra_article_info', wagtail.blocks.StructBlock([('header', wagtail.blocks.CharBlock(help_text='Optional!', required=False)), ('content', wagtail.blocks.RichTextBlock()), ('images', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))]), default=[], help_text='Optional!')), ('position', wagtail.blocks.ChoiceBlock(choices=[('center', 'Center'), ('left', 'Left'), ('right', 'Right')])), ('template', wagtail.blocks.ChoiceBlock(choices=[('editors-note', "Editor's note"), ('highlight', 'Highlight'), ('tip-form', 'Tip form')]))])), ('dropcap', wagtail.blocks.TextBlock(help_text='Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a <p class="drop-cap">...</p> element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('audio', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='File format: .m4a, .mp4, .mp, .wav, or .ogg', required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('click_to_enlarge', wagtail.blocks.BooleanBlock(default=True, help_text='Leaving this checked means readers will be able to click on the image to see it enlarged', required=False)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full-width', 'Full width'), ('full', 'Wide'), ('large', 'Normal'), ('medium', 'Medium'), ('small', 'Small')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))])), ('gallery_block', wagtail.blocks.StructBlock([('images', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('click_to_enlarge', wagtail.blocks.BooleanBlock(default=True, help_text='Leaving this checked means readers will be able to click on the image to see it enlarged', required=False)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full-width', 'Full width'), ('full', 'Wide'), ('large', 'Normal'), ('medium', 'Medium'), ('small', 'Small')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))])))], label='Image carousel')), ('image_grid', wagtail.blocks.StructBlock([('images', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False))]))), ('width', wagtail.blocks.ChoiceBlock(choices=[('auto', 'auto'), ('fit-content', 'Retain aspect ratio'), ('600px', '600'), ('800px', '800'), ('1000px', '1000'), ('1200px', '1200')])), ('height', wagtail.blocks.ChoiceBlock(choices=[('auto', 'auto'), ('300px', '300'), ('400px', '400'), ('500px', '500'), ('600px', '600'), ('800px', '800')]))])), ('image_wall', wagtail.blocks.StructBlock([('wall_blocks', wagtail.blocks.StreamBlock([('two_tracks', wagtail.blocks.StructBlock([('left', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))]))), ('right', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))]))), ('sizing', wagtail.blocks.ChoiceBlock(choices=[('sizing-large-left', 'Large left'), ('sizing-large-right', 'Large right')], help_text='The large size will take up 2/3 of the width')), ('height', wagtail.blocks.ChoiceBlock(choices=[('height-left', 'Set left to full height'), ('height-right', 'Set right to full height')]))])), ('row', wagtail.blocks.StructBlock([('images', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))]))), ('height', wagtail.blocks.ChoiceBlock(choices=[('auto', 'auto'), ('300px', '300'), ('400px', '400'), ('500px', '500'), ('600px', '600'), ('800px', '800')]))]))])), ('width', wagtail.blocks.ChoiceBlock(choices=[('auto', 'auto'), ('600px', '600'), ('800px', '800'), ('1000px', '1000'), ('1200px', '1200'), ('1500px', '1500')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('attachment_overlay', wagtail.blocks.StructBlock([('position', wagtail.blocks.ChoiceBlock(choices=[('default', 'Center'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full-width', 'Full width'), ('full', 'Wide'), ('large', 'Normal'), ('medium', 'Medium'), ('small', 'Small')])), ('attachments', wagtail.blocks.StreamBlock([('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))])), ('video', wagtail.blocks.StructBlock([('video', wagtail.documents.blocks.DocumentChooserBlock(help_text='File format: .mp4', required=True))]))])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='The first attachment is the base. When this block is in view, the subsequent attachments fade in.')), ('image_header', wagtail.blocks.StructBlock([('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('header', wagtail.blocks.CharBlock()), ('text', wagtail.blocks.CharBlock())])), ('pdf', wagtail.blocks.StructBlock([('pdf', wagtail.documents.blocks.DocumentChooserBlock(help_text='File format: .pdf', required=True)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('style_default', 'Default'), ('contrast', 'Contrast'), ('enlarged_quotation', 'Enlarged quotation'), ('block_quote', 'Block quote')])), ('source', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='Optional, file format: .m4a, .mp4, .mp, .wav, or .ogg', required=False)), ('images', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))]), default=[], help_text='Optional!')), ('position', wagtail.blocks.ChoiceBlock(choices=[('center', 'Center'), ('left', 'Left'), ('right', 'Right')]))])), ('header_link', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('header_menu', wagtail.blocks.StructBlock([('list', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a header so that this button will send the user to the section of the page with said header')), ('colour', wagtail.blocks.CharBlock(default='0071c9'))], label='Page Link')))])), ('visual_essay', wagtail.blocks.StructBlock([('view', wagtail.blocks.StructBlock([('view', wagtail.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image'), ('vs-over-image vs-over-image--left', 'Text (left) Over Image')]))])), ('content', wagtail.blocks.StreamBlock([('rich_text', wagtail.blocks.StructBlock([('block', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='doc-full')), ('image', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('click_to_enlarge', wagtail.blocks.BooleanBlock(default=True, help_text='Leaving this checked means readers will be able to click on the image to see it enlarged', required=False)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full-width', 'Full width'), ('full', 'Wide'), ('large', 'Normal'), ('medium', 'Medium'), ('small', 'Small')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='image')), ('attachment_overlay', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('position', wagtail.blocks.ChoiceBlock(choices=[('default', 'Center'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full-width', 'Full width'), ('full', 'Wide'), ('large', 'Normal'), ('medium', 'Medium'), ('small', 'Small')])), ('attachments', wagtail.blocks.StreamBlock([('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))])), ('video', wagtail.blocks.StructBlock([('video', wagtail.documents.blocks.DocumentChooserBlock(help_text='File format: .mp4', required=True))]))])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='The first attachment is the base. When this block is in view, the subsequent attachments fade in.')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='image')), ('video', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='media')), ('audio', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='File format: .m4a, .mp4, .mp, .wav, or .ogg', required=True))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='media')), ('raw_html', wagtail.blocks.StructBlock([('block', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='code')), ('quote', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('style_default', 'Default'), ('contrast', 'Contrast'), ('enlarged_quotation', 'Enlarged quotation'), ('block_quote', 'Block quote')])), ('source', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='Optional, file format: .m4a, .mp4, .mp, .wav, or .ogg', required=False)), ('images', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))]), default=[], help_text='Optional!'))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='openquote')), ('header_link', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='title')), ('gap', wagtail.blocks.StructBlock([('id', wagtail.blocks.CharBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(default=0, min_value=0, required=True))])), ('switch_view', wagtail.blocks.StructBlock([('view', wagtail.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image'), ('vs-over-image vs-over-image--left', 'Text (left) Over Image')]))]))]))])), ('personality_quiz', wagtail.blocks.StructBlock([('personalities', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('personality_name', wagtail.blocks.CharBlock()), ('personality_result_text', wagtail.blocks.RichTextBlock(help_text='Appears when user is matched with this personality. Use $PERCENTMATCH$ as a placeholder for the percent match with this personlity that is calculated from the users choices. The percent match is calculated by the amount of points obtained for that personality divided by the maximum possible amount of points you can get for that personality.')), ('personality_image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))]))]))), ('questions', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('question_text', wagtail.blocks.RichTextBlock()), ('answers', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('answer_text', wagtail.blocks.CharBlock(max_length=255, required=True)), ('points', wagtail.blocks.ListBlock(wagtail.blocks.IntegerBlock(help_text='The amount of points selecting this answer adds to the personality of the same item number (first item corresponds with the first personality).'), help_text='Selecting an answer can give points to multiple personalities. The item number of the point corresponds with the item number of the personality.'))])))])))])), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html')), ('cards', wagtail.blocks.StructBlock([('container_type', wagtail.blocks.ChoiceBlock(choices=[('promo-staggered', 'Staggered promo'), ('open-positions', 'Open positions'), ('profiles', 'Profiles'), ('dropdown', 'Dropdown')])), ('cards', wagtail.blocks.StreamBlock([('text_card', wagtail.blocks.StructBlock([('text', wagtail.blocks.RichTextBlock(required=False))])), ('image_card', wagtail.blocks.StructBlock([('text', wagtail.blocks.RichTextBlock(required=False)), ('image', wagtail.images.blocks.ImageChooserBlock(required=True))])), ('video_card', wagtail.blocks.StructBlock([('text', wagtail.blocks.RichTextBlock(required=False)), ('video', wagtail.documents.blocks.DocumentChooserBlock(help_text='File format: .mp4', required=True))])), ('dropdown_card', wagtail.blocks.StructBlock([('text', wagtail.blocks.RichTextBlock(required=False)), ('header', wagtail.blocks.CharBlock())]))]))])), ('article_promo', wagtail.blocks.StructBlock([('article', wagtail.blocks.PageChooserBlock(page_type=['article.ArticlePage']))]))], blank=True, null=True, use_json_field=True),
),
]