Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the Website to Wagtail 3 #1216

Merged
merged 34 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
108cfa4
Bump requests from 2.24.0 to 2.31.0
dependabot[bot] Jul 6, 2023
0c839ea
Bump django-extensions from 3.1.3 to 3.2.3
dependabot[bot] Aug 14, 2023
27d5248
Bump wagtail-modelchooser from 2.13.1 to 4.0.1
dependabot[bot] Aug 14, 2023
fb64bc4
Bump gunicorn from 20.0.4 to 21.2.0
dependabot[bot] Aug 14, 2023
96a1670
Bump pymemcache from 3.5.0 to 4.0.0
dependabot[bot] Aug 14, 2023
cd17fab
Bump django from 3.2.11 to 4.2.4
dependabot[bot] Aug 14, 2023
8dd8c2f
Bump whitenoise from 5.1.0 to 6.5.0
dependabot[bot] Aug 14, 2023
8ae0e52
Bump beautifulsoup4 from 4.8.2 to 4.12.2
dependabot[bot] Aug 14, 2023
57455b3
Bump google-cloud-datastore from 1.15.0 to 2.17.0
dependabot[bot] Aug 14, 2023
87321b1
Bump wagtail from 2.15.3 to 5.1.1
dependabot[bot] Aug 14, 2023
39db0c6
Merge remote-tracking branch 'origin/dependabot/pip/requests-2.31.0' …
FireBoyAJ24 Aug 15, 2023
92523ac
Merge remote-tracking branch 'origin/dependabot/pip/django-extensions…
FireBoyAJ24 Aug 15, 2023
4bb36df
Merge remote-tracking branch 'origin/dependabot/pip/wagtail-modelchoo…
FireBoyAJ24 Aug 15, 2023
dd16c89
Wagtail modelchooser need wagtail to be 4.0.0 up
FireBoyAJ24 Aug 15, 2023
d2bd4c4
Merge remote-tracking branch 'origin/remove-dispatch' into Test-pytho…
FireBoyAJ24 Aug 15, 2023
ccd3264
Removed unneccesary dispatch filters in templates
FireBoyAJ24 Aug 15, 2023
d5b995b
Merge branch 'remove-dispatch' into Test-python-packages-Akshanjay
FireBoyAJ24 Aug 15, 2023
f69f341
Merge remote-tracking branch 'origin/dependabot/pip/django-4.2.4' int…
FireBoyAJ24 Aug 15, 2023
fa740d1
Merge of dependabot/pip/wagtail-5.1.1 into Test-python-packages-Aksha…
FireBoyAJ24 Aug 15, 2023
e2b1842
Merge remote-tracking branch 'origin/dependabot/pip/wagtail-5.1.1' in…
FireBoyAJ24 Aug 15, 2023
70370ae
Updated all the imports to wagtail 3.0
FireBoyAJ24 Aug 16, 2023
60c6737
Made Request changes from Wagtail
FireBoyAJ24 Aug 16, 2023
347cbf7
Adjused the dev requirements versions
FireBoyAJ24 Aug 16, 2023
c1c0c26
Removal of the phonenumber packages
FireBoyAJ24 Aug 16, 2023
639107a
Updated the requirements-prd
FireBoyAJ24 Aug 16, 2023
3f432ac
Merge remote-tracking branch 'origin/dependabot/pip/gunicorn-21.2.0' …
FireBoyAJ24 Aug 16, 2023
a37f4a8
Merge remote-tracking branch 'origin/dependabot/pip/pymemcache-4.0.0'…
FireBoyAJ24 Aug 16, 2023
4061459
Merge remote-tracking branch 'origin/dependabot/pip/whitenoise-6.5.0'…
FireBoyAJ24 Aug 16, 2023
9a9364e
Updated the wagtail cache to 2.1.1 for wagtail 3
FireBoyAJ24 Aug 16, 2023
791eae3
Merge remote-tracking branch 'origin/dependabot/pip/beautifulsoup4-4.…
FireBoyAJ24 Aug 16, 2023
666887f
Changed the version of bs4 to be compatible to wagtail
FireBoyAJ24 Aug 16, 2023
f584219
Merge remote-tracking branch 'origin/dependabot/pip/google-cloud-data…
FireBoyAJ24 Aug 16, 2023
768d4f8
Merge branch 'develop' into Test-python-packages-Akshanjay
FireBoyAJ24 Aug 17, 2023
e2fc7e8
Merge branch 'develop' of https://github.com/ubyssey/ubyssey.ca into …
brittkhat Nov 30, 2023
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
4 changes: 2 additions & 2 deletions ads/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.db import models
from modelcluster.fields import ParentalKey
from modelcluster.models import ClusterableModel
from wagtail.admin.edit_handlers import TabbedInterface, ObjectList, MultiFieldPanel, HelpPanel, InlinePanel
from wagtail.core.models import Orderable
from wagtail.admin.panels import TabbedInterface, ObjectList, MultiFieldPanel, HelpPanel, InlinePanel
from wagtail.models import Orderable
from wagtail.contrib.settings.models import BaseSetting, register_setting
from wagtailmodelchooser import register_model_chooser
from wagtailmodelchooser.edit_handlers import ModelChooserPanel
Expand Down
8 changes: 4 additions & 4 deletions archive/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from modelcluster.fields import ParentalKey

from section.models import SectionPage
from wagtail.core.models import Page, Orderable
from wagtail.models import Page, Orderable
from wagtail.snippets.edit_handlers import SnippetChooserPanel
from wagtail.admin.edit_handlers import MultiFieldPanel, InlinePanel, HelpPanel, PageChooserPanel
from wagtail.admin.panels import MultiFieldPanel, InlinePanel, HelpPanel, PageChooserPanel, FieldPanel

from wagtail.contrib.routable_page.models import RoutablePageMixin, route
from videos.models import VideosPage, VideoSnippet
Expand Down Expand Up @@ -53,7 +53,7 @@ class MagazineOrderables(Orderable):
panels = [
MultiFieldPanel(
[
SnippetChooserPanel('magazine_filter'),
FieldPanel('magazine_filter'),
],
heading="Magazine",
),
Expand All @@ -74,7 +74,7 @@ class SpoofOrderables(Orderable):
panels = [
MultiFieldPanel(
[
SnippetChooserPanel('spoof_filter'),
FieldPanel('spoof_filter'),
],
heading="Spoof",
),
Expand Down
4 changes: 2 additions & 2 deletions article/blocks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from wagtail.core import blocks
from wagtail.core.blocks import field_block
from wagtail import blocks
from wagtail.blocks import field_block
from images import blocks as image_blocks
from videos import blocks as video_blocks
from wagtail.documents.blocks import DocumentChooserBlock
Expand Down
6 changes: 3 additions & 3 deletions article/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import django.utils.timezone
import images.models
import modelcluster.fields
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.blocks
import wagtail.fields
import wagtail.embeds.blocks
import wagtail.images.blocks
import wagtail.snippets.blocks
Expand Down Expand Up @@ -52,7 +52,7 @@ class Migration(migrations.Migration):
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')),
('current_section', models.CharField(blank=True, default='', max_length=255)),
('content', wagtail.core.fields.StreamField([('richtext', wagtail.core.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')), ('plaintext', wagtail.core.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.core.blocks.TextBlock(help_text='DO NOT USE - Legacy block. 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.core.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.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')), ('image', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.core.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.core.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.core.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.CharBlock(required=False)), ('source', wagtail.core.blocks.CharBlock(required=False))], label='Pull Quote', template='article/stream_blocks/quote.html')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html'))], blank=True, null=True)),
('content', 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')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.blocks.TextBlock(help_text='DO NOT USE - Legacy block. 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')), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('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.CharBlock(required=False)), ('source', wagtail.blocks.CharBlock(required=False))], label='Pull Quote', template='article/stream_blocks/quote.html')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html'))], blank=True, null=True)),
('explicit_published_at', models.DateTimeField(blank=True, help_text='Optional. Publication date which is explicitly shown to the reader. Articles are seperately date/timestamped for database use; if this field is blank front page etc. will display the database publication date.', null=True, verbose_name='Published At (Override)')),
('last_modified_at', models.DateTimeField(auto_now=True)),
('show_last_modified', models.BooleanField(default=False, help_text='Check this to alert readers the article has been revised since its publication.')),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated by Django 3.2.11 on 2022-06-14 19:36

from django.db import migrations
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.blocks
import wagtail.fields


class Migration(migrations.Migration):
Expand All @@ -16,6 +16,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='specialarticlelikepage',
name='right_column_content',
field=wagtail.core.fields.StreamField([('richtext', wagtail.core.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')), ('plaintext', wagtail.core.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block'))], blank=True, null=True),
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')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block'))], blank=True, null=True),
),
]
6 changes: 3 additions & 3 deletions article/migrations/0019_alter_articlepage_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from django.db import migrations
import images.models
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.blocks
import wagtail.fields
import wagtail.embeds.blocks
import wagtail.images.blocks
import wagtail.snippets.blocks
Expand All @@ -19,6 +19,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='articlepage',
name='content',
field=wagtail.core.fields.StreamField([('richtext', wagtail.core.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')), ('plaintext', wagtail.core.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.core.blocks.TextBlock(help_text='DO NOT USE - Legacy block. 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.core.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.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')), ('image', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.core.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.core.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.core.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.core.blocks.CharBlock(max_length=255, required=False))])), ('raw_html', wagtail.core.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.CharBlock(required=False)), ('source', wagtail.core.blocks.CharBlock(required=False))], icon='openquote', label='Pull Quote', template='article/stream_blocks/quote.html')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html'))], blank=True, null=True),
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')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.blocks.TextBlock(help_text='DO NOT USE - Legacy block. 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')), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('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.CharBlock(required=False)), ('source', wagtail.blocks.CharBlock(required=False))], icon='openquote', label='Pull Quote', template='article/stream_blocks/quote.html')), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html'))], blank=True, null=True),
),
]
Loading
Loading