diff --git a/migrations/0001_initial.py b/migrations/0001_initial.py new file mode 100644 index 0000000..40d5e4a --- /dev/null +++ b/migrations/0001_initial.py @@ -0,0 +1,179 @@ +# Generated by Django 4.0.4 on 2022-04-28 10:54 + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion +import modelcluster.fields +import wagtail.core.blocks +import wagtail.core.fields +import wagtail.embeds.blocks +import wagtail.images.blocks +import wagtools.blocks + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('wagtailcore', '0066_collection_management_permissions'), + ('wagtailimages', '0023_add_choose_permissions'), + ] + + operations = [ + migrations.CreateModel( + name='ContactPage', + 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')), + ('google_ad_code', models.CharField(blank=True, max_length=50, null=True)), + ('to_address', models.CharField(blank=True, help_text='Optional - form submissions will be emailed to these addresses. Separate multiple addresses by comma.', max_length=255, verbose_name='to address')), + ('from_address', models.CharField(blank=True, max_length=255, verbose_name='from address')), + ('subject', models.CharField(blank=True, max_length=255, verbose_name='subject')), + ('my_stream', wagtail.core.fields.StreamField([('hero', wagtail.core.blocks.StructBlock([('heading', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title')), ('classesHeading', wagtail.core.blocks.CharBlock(blank=True, label='Heading CSS (text-dark etc)', required=False)), ('text', wagtail.core.blocks.TextBlock(blank=True, required=False)), ('classesText', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes for Text (text-success etc)', required=False)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes from BS (bg-light or bg-dark)', required=False)), ('background', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('buttonLabel', wagtail.core.blocks.CharBlock(blank=True, label='Text on button', required=False)), ('buttonUrl', wagtail.core.blocks.URLBlock(blank=True, required=False))])), ('title', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title', icon='title', max_length=200, template='streams/title_block.html')), ('richtext', wagtools.blocks.RichtextBlock()), ('columns', wagtail.core.blocks.StructBlock([('left_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Left column content')), ('right_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Right column content'))])), ('image', wagtail.images.blocks.ImageChooserBlock('Choose an image ...', icon='image', label='Choose an image ...', template='streams/image_block.html')), ('image_small', wagtail.images.blocks.ImageChooserBlock('Choose a small image ...', icon='image', label='Choose a small image ...', template='streams/image_small.html')), ('videoembed', wagtail.embeds.blocks.EmbedBlock('Video embed (YouTube and Facebook)', blank=True, icon='media', label='Enter Video URL', max_length=500, null=True, template='streams/video_embed_block.html')), ('googlemap', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='site', label='Enter Google Map URL', max_length=500, null=True, template='streams/google_map_block.html')), ('googlecal', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='date', label='Enter Google Calendar URL', max_length=500, null=True, template='streams/google_cal_block.html')), ('carousel', wagtail.core.blocks.StructBlock([('slides', wagtail.core.blocks.ListBlock(wagtools.blocks.SlideBlock))])), ('cards', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('cards', wagtail.core.blocks.ListBlock(wagtools.blocks.CardBlock))])), ('testimonial', wagtail.core.blocks.StructBlock([('test_name', wagtail.core.blocks.TextBlock(blank=True)), ('test_quote', wagtail.core.blocks.TextBlock(blank=True)), ('test_pic', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('test_reversed', wagtail.core.blocks.BooleanBlock(default=False, required=False))])), ('simplequote', wagtail.core.blocks.StructBlock([('leadtext', wagtail.core.blocks.TextBlock(required=False)), ('quotation', wagtail.core.blocks.TextBlock(required=True)), ('source', wagtail.core.blocks.CharBlock(max_length=150, required=True))])), ('button', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.CharBlock(blank=True)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS from Bootstrap (btn-success btn-danger)')), ('link', wagtail.core.blocks.URLBlock(blank=True, label='external URL', required=False)), ('pagelink', wagtail.core.blocks.PageChooserBlock(blank=True, label='internal URL', required=False))])), ('buttongroup', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('buttons', wagtail.core.blocks.ListBlock(wagtools.blocks.ButtonBlock))])), ('code', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.TextBlock()), ('paragraph', wagtail.core.blocks.TextBlock()), ('code', wagtail.core.blocks.StructBlock([('language', wagtail.core.blocks.ChoiceBlock(choices=[('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('html', 'HTML'), ('javascript', 'Javascript'), ('json', 'JSON'), ('python', 'Python'), ('scss', 'SCSS'), ('yaml', 'YAML')], help_text='Coding language', identifier='language', label='Language')), ('code', wagtail.core.blocks.TextBlock(identifier='code', label='Code'))], label='Code'))]))], blank=True, null=True)), + ('thank_you', wagtail.core.fields.StreamField([('hero', wagtail.core.blocks.StructBlock([('heading', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title')), ('classesHeading', wagtail.core.blocks.CharBlock(blank=True, label='Heading CSS (text-dark etc)', required=False)), ('text', wagtail.core.blocks.TextBlock(blank=True, required=False)), ('classesText', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes for Text (text-success etc)', required=False)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes from BS (bg-light or bg-dark)', required=False)), ('background', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('buttonLabel', wagtail.core.blocks.CharBlock(blank=True, label='Text on button', required=False)), ('buttonUrl', wagtail.core.blocks.URLBlock(blank=True, required=False))])), ('title', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title', icon='title', max_length=200, template='streams/title_block.html')), ('richtext', wagtools.blocks.RichtextBlock()), ('columns', wagtail.core.blocks.StructBlock([('left_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Left column content')), ('right_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Right column content'))])), ('image', wagtail.images.blocks.ImageChooserBlock('Choose an image ...', icon='image', label='Choose an image ...', template='streams/image_block.html')), ('image_small', wagtail.images.blocks.ImageChooserBlock('Choose a small image ...', icon='image', label='Choose a small image ...', template='streams/image_small.html')), ('videoembed', wagtail.embeds.blocks.EmbedBlock('Video embed (YouTube and Facebook)', blank=True, icon='media', label='Enter Video URL', max_length=500, null=True, template='streams/video_embed_block.html')), ('googlemap', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='site', label='Enter Google Map URL', max_length=500, null=True, template='streams/google_map_block.html')), ('googlecal', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='date', label='Enter Google Calendar URL', max_length=500, null=True, template='streams/google_cal_block.html')), ('carousel', wagtail.core.blocks.StructBlock([('slides', wagtail.core.blocks.ListBlock(wagtools.blocks.SlideBlock))])), ('cards', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('cards', wagtail.core.blocks.ListBlock(wagtools.blocks.CardBlock))])), ('testimonial', wagtail.core.blocks.StructBlock([('test_name', wagtail.core.blocks.TextBlock(blank=True)), ('test_quote', wagtail.core.blocks.TextBlock(blank=True)), ('test_pic', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('test_reversed', wagtail.core.blocks.BooleanBlock(default=False, required=False))])), ('simplequote', wagtail.core.blocks.StructBlock([('leadtext', wagtail.core.blocks.TextBlock(required=False)), ('quotation', wagtail.core.blocks.TextBlock(required=True)), ('source', wagtail.core.blocks.CharBlock(max_length=150, required=True))])), ('button', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.CharBlock(blank=True)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS from Bootstrap (btn-success btn-danger)')), ('link', wagtail.core.blocks.URLBlock(blank=True, label='external URL', required=False)), ('pagelink', wagtail.core.blocks.PageChooserBlock(blank=True, label='internal URL', required=False))])), ('buttongroup', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('buttons', wagtail.core.blocks.ListBlock(wagtools.blocks.ButtonBlock))])), ('code', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.TextBlock()), ('paragraph', wagtail.core.blocks.TextBlock()), ('code', wagtail.core.blocks.StructBlock([('language', wagtail.core.blocks.ChoiceBlock(choices=[('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('html', 'HTML'), ('javascript', 'Javascript'), ('json', 'JSON'), ('python', 'Python'), ('scss', 'SCSS'), ('yaml', 'YAML')], help_text='Coding language', identifier='language', label='Language')), ('code', wagtail.core.blocks.TextBlock(identifier='code', label='Code'))], label='Code'))]))], blank=True, null=True)), + ('button_css', models.CharField(blank=True, default='btn-success', help_text='Classes from FontAwesome and Bootstrap can be used', max_length=300, null=True, verbose_name='Button CSS')), + ('button_text', models.CharField(blank=True, default='Submit', help_text='FontAwesome icons can be used', max_length=300, null=True)), + ('seo_image', models.ForeignKey(blank=True, help_text='Optional social media image 300x300px image < 300kb.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page', models.Model), + ), + migrations.CreateModel( + name='EditableFooter', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('text', models.CharField(blank=True, max_length=255, null=True, verbose_name='Visible text (eg. Latest School Bulletin)')), + ('link', models.CharField(blank=True, max_length=255, null=True, verbose_name='Link to resource (eg tel:+62-061-661-6765)')), + ('hover', models.CharField(blank=True, max_length=255, null=True, verbose_name='Desc on hover (eg. December Bulletin)')), + ('icon', models.CharField(blank=True, max_length=255, null=True, verbose_name='FA Icon (eg. fas fa-newspaper fa-fw fa-2x)')), + ('css', models.CharField(blank=True, max_length=255, null=True, verbose_name='List CSS Classes (eg. text-primary bg-transparent btn btn-outine-dark py-0)')), + ], + options={ + 'verbose_name': 'Footer element', + 'verbose_name_plural': 'FOOTER : Add lines, links and icons to the site footer', + }, + ), + migrations.CreateModel( + name='Facebook', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('site_tag', models.CharField(max_length=1024)), + ], + options={ + 'verbose_name': 'Facebook site code', + 'verbose_name_plural': 'Facebook site code', + }, + ), + migrations.CreateModel( + name='Google', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('site_tag', models.CharField(max_length=255)), + ], + options={ + 'verbose_name': 'Google site code', + 'verbose_name_plural': 'Google site code', + }, + ), + migrations.CreateModel( + name='SocialLinks', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('text', models.CharField(blank=True, max_length=255, null=True, verbose_name='Visible text (eg. Latest School Bulletin)')), + ('link', models.CharField(blank=True, max_length=255, null=True, verbose_name='Link to resource (eg tel:+62-061-661-6765)')), + ('hover', models.CharField(blank=True, max_length=255, null=True, verbose_name='Desc on hover (eg. December Bulletin)')), + ('icon', models.CharField(blank=True, max_length=255, null=True, verbose_name='FA Icon (eg. fas fa-newspaper fa-fw fa-2x)')), + ('css', models.CharField(blank=True, max_length=255, null=True, verbose_name='List CSS Classes (eg. text-primary py-0)')), + ], + options={ + 'verbose_name': 'Social Media link and icon', + 'verbose_name_plural': 'Social Media links and icons', + }, + ), + migrations.CreateModel( + name='OrphanContactPage', + fields=[ + ('contactpage_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtools.contactpage')), + ], + options={ + 'abstract': False, + }, + bases=('wagtools.contactpage',), + ), + migrations.CreateModel( + name='SectionPage', + 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')), + ('google_ad_code', models.CharField(blank=True, max_length=50, null=True)), + ('body', wagtail.core.fields.RichTextField(blank=True)), + ('my_stream', wagtail.core.fields.StreamField([('hero', wagtail.core.blocks.StructBlock([('heading', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title')), ('classesHeading', wagtail.core.blocks.CharBlock(blank=True, label='Heading CSS (text-dark etc)', required=False)), ('text', wagtail.core.blocks.TextBlock(blank=True, required=False)), ('classesText', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes for Text (text-success etc)', required=False)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes from BS (bg-light or bg-dark)', required=False)), ('background', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('buttonLabel', wagtail.core.blocks.CharBlock(blank=True, label='Text on button', required=False)), ('buttonUrl', wagtail.core.blocks.URLBlock(blank=True, required=False))])), ('title', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title', icon='title', max_length=200, template='streams/title_block.html')), ('richtext', wagtools.blocks.RichtextBlock()), ('columns', wagtail.core.blocks.StructBlock([('left_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Left column content')), ('right_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Right column content'))])), ('image', wagtail.images.blocks.ImageChooserBlock('Choose an image ...', icon='image', label='Choose an image ...', template='streams/image_block.html')), ('image_small', wagtail.images.blocks.ImageChooserBlock('Choose a small image ...', icon='image', label='Choose a small image ...', template='streams/image_small.html')), ('videoembed', wagtail.embeds.blocks.EmbedBlock('Video embed (YouTube and Facebook)', blank=True, icon='media', label='Enter Video URL', max_length=500, null=True, template='streams/video_embed_block.html')), ('googlemap', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='site', label='Enter Google Map URL', max_length=500, null=True, template='streams/google_map_block.html')), ('googlecal', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='date', label='Enter Google Calendar URL', max_length=500, null=True, template='streams/google_cal_block.html')), ('carousel', wagtail.core.blocks.StructBlock([('slides', wagtail.core.blocks.ListBlock(wagtools.blocks.SlideBlock))])), ('cards', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('cards', wagtail.core.blocks.ListBlock(wagtools.blocks.CardBlock))])), ('testimonial', wagtail.core.blocks.StructBlock([('test_name', wagtail.core.blocks.TextBlock(blank=True)), ('test_quote', wagtail.core.blocks.TextBlock(blank=True)), ('test_pic', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('test_reversed', wagtail.core.blocks.BooleanBlock(default=False, required=False))])), ('simplequote', wagtail.core.blocks.StructBlock([('leadtext', wagtail.core.blocks.TextBlock(required=False)), ('quotation', wagtail.core.blocks.TextBlock(required=True)), ('source', wagtail.core.blocks.CharBlock(max_length=150, required=True))])), ('button', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.CharBlock(blank=True)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS from Bootstrap (btn-success btn-danger)')), ('link', wagtail.core.blocks.URLBlock(blank=True, label='external URL', required=False)), ('pagelink', wagtail.core.blocks.PageChooserBlock(blank=True, label='internal URL', required=False))])), ('buttongroup', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('buttons', wagtail.core.blocks.ListBlock(wagtools.blocks.ButtonBlock))])), ('code', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.TextBlock()), ('paragraph', wagtail.core.blocks.TextBlock()), ('code', wagtail.core.blocks.StructBlock([('language', wagtail.core.blocks.ChoiceBlock(choices=[('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('html', 'HTML'), ('javascript', 'Javascript'), ('json', 'JSON'), ('python', 'Python'), ('scss', 'SCSS'), ('yaml', 'YAML')], help_text='Coding language', identifier='language', label='Language')), ('code', wagtail.core.blocks.TextBlock(identifier='code', label='Code'))], label='Code'))]))], blank=True, null=True)), + ('seo_image', models.ForeignKey(blank=True, help_text='Optional social media image 300x300px image < 300kb.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page', models.Model), + ), + migrations.CreateModel( + name='SectionIndexPage', + 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')), + ('google_ad_code', models.CharField(blank=True, max_length=50, null=True)), + ('alt_template', models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(3), django.core.validators.MinValueValidator(1)], verbose_name='Index-page style? 1) List 2) Card 3) Card & Image')), + ('my_stream', wagtail.core.fields.StreamField([('hero', wagtail.core.blocks.StructBlock([('heading', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title')), ('classesHeading', wagtail.core.blocks.CharBlock(blank=True, label='Heading CSS (text-dark etc)', required=False)), ('text', wagtail.core.blocks.TextBlock(blank=True, required=False)), ('classesText', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes for Text (text-success etc)', required=False)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes from BS (bg-light or bg-dark)', required=False)), ('background', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('buttonLabel', wagtail.core.blocks.CharBlock(blank=True, label='Text on button', required=False)), ('buttonUrl', wagtail.core.blocks.URLBlock(blank=True, required=False))])), ('title', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title', icon='title', max_length=200, template='streams/title_block.html')), ('richtext', wagtools.blocks.RichtextBlock()), ('columns', wagtail.core.blocks.StructBlock([('left_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Left column content')), ('right_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Right column content'))])), ('image', wagtail.images.blocks.ImageChooserBlock('Choose an image ...', icon='image', label='Choose an image ...', template='streams/image_block.html')), ('image_small', wagtail.images.blocks.ImageChooserBlock('Choose a small image ...', icon='image', label='Choose a small image ...', template='streams/image_small.html')), ('videoembed', wagtail.embeds.blocks.EmbedBlock('Video embed (YouTube and Facebook)', blank=True, icon='media', label='Enter Video URL', max_length=500, null=True, template='streams/video_embed_block.html')), ('googlemap', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='site', label='Enter Google Map URL', max_length=500, null=True, template='streams/google_map_block.html')), ('googlecal', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='date', label='Enter Google Calendar URL', max_length=500, null=True, template='streams/google_cal_block.html')), ('carousel', wagtail.core.blocks.StructBlock([('slides', wagtail.core.blocks.ListBlock(wagtools.blocks.SlideBlock))])), ('cards', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('cards', wagtail.core.blocks.ListBlock(wagtools.blocks.CardBlock))])), ('testimonial', wagtail.core.blocks.StructBlock([('test_name', wagtail.core.blocks.TextBlock(blank=True)), ('test_quote', wagtail.core.blocks.TextBlock(blank=True)), ('test_pic', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('test_reversed', wagtail.core.blocks.BooleanBlock(default=False, required=False))])), ('simplequote', wagtail.core.blocks.StructBlock([('leadtext', wagtail.core.blocks.TextBlock(required=False)), ('quotation', wagtail.core.blocks.TextBlock(required=True)), ('source', wagtail.core.blocks.CharBlock(max_length=150, required=True))])), ('button', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.CharBlock(blank=True)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS from Bootstrap (btn-success btn-danger)')), ('link', wagtail.core.blocks.URLBlock(blank=True, label='external URL', required=False)), ('pagelink', wagtail.core.blocks.PageChooserBlock(blank=True, label='internal URL', required=False))])), ('buttongroup', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('buttons', wagtail.core.blocks.ListBlock(wagtools.blocks.ButtonBlock))])), ('code', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.TextBlock()), ('paragraph', wagtail.core.blocks.TextBlock()), ('code', wagtail.core.blocks.StructBlock([('language', wagtail.core.blocks.ChoiceBlock(choices=[('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('html', 'HTML'), ('javascript', 'Javascript'), ('json', 'JSON'), ('python', 'Python'), ('scss', 'SCSS'), ('yaml', 'YAML')], help_text='Coding language', identifier='language', label='Language')), ('code', wagtail.core.blocks.TextBlock(identifier='code', label='Code'))], label='Code'))]))], blank=True, null=True)), + ('seo_image', models.ForeignKey(blank=True, help_text='Optional social media image 300x300px image < 300kb.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page', models.Model), + ), + migrations.CreateModel( + name='SectionGalleryImage', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('sort_order', models.IntegerField(blank=True, editable=False, null=True)), + ('caption', models.CharField(blank=True, max_length=250)), + ('image', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailimages.image')), + ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='gallery_images', to='wagtools.sectionpage')), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='FormField', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('sort_order', models.IntegerField(blank=True, editable=False, null=True)), + ('clean_name', models.CharField(blank=True, default='', help_text='Safe name of the form field, the label converted to ascii_snake_case', max_length=255, verbose_name='name')), + ('label', models.CharField(help_text='The label of the form field', max_length=255, verbose_name='label')), + ('field_type', models.CharField(choices=[('singleline', 'Single line text'), ('multiline', 'Multi-line text'), ('email', 'Email'), ('number', 'Number'), ('url', 'URL'), ('checkbox', 'Checkbox'), ('checkboxes', 'Checkboxes'), ('dropdown', 'Drop down'), ('multiselect', 'Multiple select'), ('radio', 'Radio buttons'), ('date', 'Date'), ('datetime', 'Date/time'), ('hidden', 'Hidden field')], max_length=16, verbose_name='field type')), + ('required', models.BooleanField(default=True, verbose_name='required')), + ('choices', models.TextField(blank=True, help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', verbose_name='choices')), + ('default_value', models.CharField(blank=True, help_text='Default value. Comma separated values supported for checkboxes.', max_length=255, verbose_name='default value')), + ('help_text', models.CharField(blank=True, max_length=255, verbose_name='help text')), + ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='form_fields', to='wagtools.contactpage')), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DefaultHomePage', + 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')), + ('google_ad_code', models.CharField(blank=True, max_length=50, null=True)), + ('my_stream', wagtail.core.fields.StreamField([('hero', wagtail.core.blocks.StructBlock([('heading', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title')), ('classesHeading', wagtail.core.blocks.CharBlock(blank=True, label='Heading CSS (text-dark etc)', required=False)), ('text', wagtail.core.blocks.TextBlock(blank=True, required=False)), ('classesText', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes for Text (text-success etc)', required=False)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS classes from BS (bg-light or bg-dark)', required=False)), ('background', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('buttonLabel', wagtail.core.blocks.CharBlock(blank=True, label='Text on button', required=False)), ('buttonUrl', wagtail.core.blocks.URLBlock(blank=True, required=False))])), ('title', wagtail.core.blocks.CharBlock(blank=True, form_classname='full title', icon='title', max_length=200, template='streams/title_block.html')), ('richtext', wagtools.blocks.RichtextBlock()), ('columns', wagtail.core.blocks.StructBlock([('left_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Left column content')), ('right_column', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.CharBlock(form_classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock())], icon='arrow-right', label='Right column content'))])), ('image', wagtail.images.blocks.ImageChooserBlock('Choose an image ...', icon='image', label='Choose an image ...', template='streams/image_block.html')), ('image_small', wagtail.images.blocks.ImageChooserBlock('Choose a small image ...', icon='image', label='Choose a small image ...', template='streams/image_small.html')), ('videoembed', wagtail.embeds.blocks.EmbedBlock('Video embed (YouTube and Facebook)', blank=True, icon='media', label='Enter Video URL', max_length=500, null=True, template='streams/video_embed_block.html')), ('googlemap', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='site', label='Enter Google Map URL', max_length=500, null=True, template='streams/google_map_block.html')), ('googlecal', wagtail.core.blocks.CharBlock('Google Calendar URL', blank=True, icon='date', label='Enter Google Calendar URL', max_length=500, null=True, template='streams/google_cal_block.html')), ('carousel', wagtail.core.blocks.StructBlock([('slides', wagtail.core.blocks.ListBlock(wagtools.blocks.SlideBlock))])), ('cards', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('cards', wagtail.core.blocks.ListBlock(wagtools.blocks.CardBlock))])), ('testimonial', wagtail.core.blocks.StructBlock([('test_name', wagtail.core.blocks.TextBlock(blank=True)), ('test_quote', wagtail.core.blocks.TextBlock(blank=True)), ('test_pic', wagtail.images.blocks.ImageChooserBlock(blank=True, required=False)), ('test_reversed', wagtail.core.blocks.BooleanBlock(default=False, required=False))])), ('simplequote', wagtail.core.blocks.StructBlock([('leadtext', wagtail.core.blocks.TextBlock(required=False)), ('quotation', wagtail.core.blocks.TextBlock(required=True)), ('source', wagtail.core.blocks.CharBlock(max_length=150, required=True))])), ('button', wagtail.core.blocks.StructBlock([('text', wagtail.core.blocks.CharBlock(blank=True)), ('classes', wagtail.core.blocks.CharBlock(blank=True, label='CSS from Bootstrap (btn-success btn-danger)')), ('link', wagtail.core.blocks.URLBlock(blank=True, label='external URL', required=False)), ('pagelink', wagtail.core.blocks.PageChooserBlock(blank=True, label='internal URL', required=False))])), ('buttongroup', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(help_text='Add title ...', required=False)), ('buttons', wagtail.core.blocks.ListBlock(wagtools.blocks.ButtonBlock))])), ('code', wagtail.core.blocks.StreamBlock([('heading', wagtail.core.blocks.TextBlock()), ('paragraph', wagtail.core.blocks.TextBlock()), ('code', wagtail.core.blocks.StructBlock([('language', wagtail.core.blocks.ChoiceBlock(choices=[('bash', 'Bash/Shell'), ('css', 'CSS'), ('diff', 'diff'), ('html', 'HTML'), ('javascript', 'Javascript'), ('json', 'JSON'), ('python', 'Python'), ('scss', 'SCSS'), ('yaml', 'YAML')], help_text='Coding language', identifier='language', label='Language')), ('code', wagtail.core.blocks.TextBlock(identifier='code', label='Code'))], label='Code'))]))], blank=True, null=True)), + ('seo_image', models.ForeignKey(blank=True, help_text='Optional social media image 300x300px image < 300kb.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page', models.Model), + ), + ] diff --git a/migrations/__init__.py b/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/models.py b/models.py index a795f5f..813be18 100644 --- a/models.py +++ b/models.py @@ -21,15 +21,6 @@ RichTextField, StreamField ) -from wagtail.core.blocks import ( - URLBlock, - TextBlock, - StructBlock, - StreamBlock, - CharBlock, - RichTextBlock, - BooleanBlock -) from wagtail.contrib.forms.models import ( AbstractEmailForm, AbstractFormField @@ -41,8 +32,8 @@ from wagtail.search import index -from wagtools.snippet import Seo, Google, Facebook, SocialLinks, EditableFooter -from wagtools.blocks import CommonStreamBlock +from .snippet import Seo, Google, Facebook, SocialLinks, EditableFooter +from .blocks import CommonStreamBlock class DefaultHomePage(Page, Seo):