Skip to content

Commit

Permalink
Upgrade to Wagtail 3.0.3 (#7423)
Browse files Browse the repository at this point in the history
* Bump Wagtail version from 2.16.3 to 3.0.3

* Update Wagtail module paths for 3.x

This commit updates the imports of Wagtail modules to be compatible
with the new organization in Wagtail 3.x. These changes are the result
of running Wagtail's updatemodulepaths command, as documented:

https://docs.wagtail.org/en/latest/releases/3.0.html#changes-to-module-paths

* Use FieldPanel instead of StreamFieldPanel

StreamFieldPanel has been deprecated in 3.0:

https://docs.wagtail.org/en/latest/releases/3.0.html#removal-of-special-purpose-field-panel-types

* Use FieldPanel instead of ImageChooserPanel

ImageChooserPanel has been deprecated in 3.0:

https://docs.wagtail.org/en/latest/releases/3.0.html#removal-of-special-purpose-field-panel-types

* Use FieldPanel instead of DocumentChooserPanel

DocumentChooserPanel has been deprecated in 3.0:

https://docs.wagtail.org/en/latest/releases/3.0.html#removal-of-special-purpose-field-panel-types

* Use FieldPanel instead of SnippetChooserPanel

 SnippetChooserPanel has been deprecated in 3.0:

https://docs.wagtail.org/en/latest/releases/3.0.html#removal-of-special-purpose-field-panel-types

* Use FieldPanel instead of PageChooserPanel

PageChooserPanel has been (mostly) deprecated in 3.0:

https://docs.wagtail.org/en/latest/releases/3.0.html#removal-of-special-purpose-field-panel-types

* Fix FieldPanel usage for Wagtail 3.x

In Wagtail 2.x, the second positional argument to FieldPanel was its
heading, but starting in 3.x you need to specify it as a keyword
argument (`heading="whatever"`).

* Update indexed field on IndexedPageRevision

In Wagtail 3.0, PageRevision models have a content field, not a
content_json field.

* Workaround for fbjs global undefined issue (#7446)

* Scroll to blocks in Cypress tests

In Cypress tests we check for block visibility using

.should('be.visible')

but this assumes that the block is visible within the browser screen
dimensions. In Wagtail 3 the admin UI changes significantly, and the
spacing changes mean that some blocks may be off screen.

This commit adds

.scrollIntoView()

before checking whether a block is visible.

* Update migration utils for content JSONField

In Wagtail 3.0+, the PageRevision content_json TextField has been
changed to a content JSONField. This commit updates our custom
migration utils to support that change.

* Update uses of PageRevision content field

In Wagtail 3.0+, the PageRevision content_json TextField has been
changed to a content JSONField. This commit updates the places in our
code where we referenced that field.

* Avoid unsafe chaining of Cypress functions

https://docs.cypress.io/api/commands/scrollintoview

Co-authored-by: Ans <[email protected]>
  • Loading branch information
chosak and anselmbradford committed Feb 15, 2023
1 parent 4c258bc commit 7c5034c
Show file tree
Hide file tree
Showing 181 changed files with 821 additions and 892 deletions.
4 changes: 2 additions & 2 deletions cfgov/ask_cfpb/migrations/0038_recreated2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from django.conf import settings
from django.db import migrations, models
from wagtail.contrib.routable_page import models as routable_models
from wagtail.core import blocks as core_blocks
from wagtail.core import fields as core_fields
from wagtail import blocks as core_blocks
from wagtail import fields as core_fields
from wagtail.search import index
from wagtail.snippets import blocks as snippets_blocks

Expand Down
18 changes: 9 additions & 9 deletions cfgov/ask_cfpb/migrations/0039_2022_squash.py

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions cfgov/ask_cfpb/migrations/0041_emailsignup_snippet.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions cfgov/ask_cfpb/migrations/0044_update_how_to_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from django.db import migrations

import wagtail.core.blocks
import wagtail.core.fields
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks

import v1.atomic_elements.tables
Expand All @@ -19,6 +19,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='answerpage',
name='answer_content',
field=wagtail.core.fields.StreamField([('text', wagtail.core.blocks.StructBlock([('anchor_tag', wagtail.core.blocks.CharBlock(help_text="Add an optional anchor link tag to allow linking directly to this block. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'block-one-tag')", label='Anchor tag', required=False)), ('content', wagtail.core.blocks.RichTextBlock(features=['bold', 'italic', 'h2', 'h3', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table_block', v1.atomic_elements.tables.AtomicTableBlock(table_options={'renderer': 'html'})), ('tip', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock(features=['link', 'document-link'], label='Tip'))])), ('video_player', wagtail.core.blocks.StructBlock([('video_id', wagtail.core.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))])), ('how_to_schema', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.CharBlock(label='Title of How To section', max_length=500)), ('title_tag', wagtail.core.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], help_text='Choose a tag for the title of the How To section.', label='Tag for How To section title')), ('show_title', wagtail.core.blocks.BooleanBlock(default=True, help_text='The How To schema requires a title to let search engines understand what it is about. If you do not want the title to be displayed in the page, uncheck this box and the title content will only be made available to crawlers and screen readers.', label='Show How To section title', required=False)), ('description', wagtail.core.blocks.RichTextBlock(blank=True, features=['ol', 'ul', 'bold', 'italic', 'link', 'document-link'], required=False)), ('step_title_tag', wagtail.core.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('b', 'Bold'), ('p', 'Paragraph')], help_text='Choose a tag for the title of each HowTo step.', label='Tag for step titles')), ('has_numbers', wagtail.core.blocks.BooleanBlock(default=False, help_text='Check this box to display numbers before step titles. ', label='Show numbers for steps', required=False)), ('steps', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('anchor_tag', wagtail.core.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag to allow linking directly to this step. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'step-one-tag').", max_length=500, required=False)), ('title', wagtail.core.blocks.CharBlock(help_text='Enter a title for this HowTo step. You do not need to include a number in the title -- numbers will be added automatically in the template if the show numbers checkbox is checked.', max_length=500)), ('step_content', wagtail.core.blocks.StreamBlock([('text', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock(features=['bold', 'italic', 'h3', 'h4', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table_block', v1.atomic_elements.tables.AtomicTableBlock(table_options={'renderer': 'html'})), ('tip', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock(features=['link', 'document-link'], label='Tip'))])), ('video_player', wagtail.core.blocks.StructBlock([('video_id', wagtail.core.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))]))]))])))])), ('faq_schema', wagtail.core.blocks.StructBlock([('description', wagtail.core.blocks.RichTextBlock(blank=True, features=['ol', 'ul', 'bold', 'italic', 'link', 'document-link'], required=False)), ('questions', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('anchor_tag', wagtail.core.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag for this question. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'question-one-tag')", max_length=500, required=False)), ('question', wagtail.core.blocks.CharBlock(max_length=500)), ('answer_content', wagtail.core.blocks.StreamBlock([('text', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock(features=['bold', 'italic', 'h3', 'h4', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table_block', v1.atomic_elements.tables.AtomicTableBlock(table_options={'renderer': 'html'})), ('tip', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock(features=['link', 'document-link'], label='Tip'))])), ('video_player', wagtail.core.blocks.StructBlock([('video_id', wagtail.core.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))]))]))])))]))], blank=True, verbose_name='Answer'),
field=wagtail.fields.StreamField([('text', wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(help_text="Add an optional anchor link tag to allow linking directly to this block. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'block-one-tag')", label='Anchor tag', required=False)), ('content', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'h2', 'h3', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table_block', v1.atomic_elements.tables.AtomicTableBlock(table_options={'renderer': 'html'})), ('tip', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(features=['link', 'document-link'], label='Tip'))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))])), ('how_to_schema', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(label='Title of How To section', max_length=500)), ('title_tag', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')], help_text='Choose a tag for the title of the How To section.', label='Tag for How To section title')), ('show_title', wagtail.blocks.BooleanBlock(default=True, help_text='The How To schema requires a title to let search engines understand what it is about. If you do not want the title to be displayed in the page, uncheck this box and the title content will only be made available to crawlers and screen readers.', label='Show How To section title', required=False)), ('description', wagtail.blocks.RichTextBlock(blank=True, features=['ol', 'ul', 'bold', 'italic', 'link', 'document-link'], required=False)), ('step_title_tag', wagtail.blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4'), ('b', 'Bold'), ('p', 'Paragraph')], help_text='Choose a tag for the title of each HowTo step.', label='Tag for step titles')), ('has_numbers', wagtail.blocks.BooleanBlock(default=False, help_text='Check this box to display numbers before step titles. ', label='Show numbers for steps', required=False)), ('steps', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag to allow linking directly to this step. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'step-one-tag').", max_length=500, required=False)), ('title', wagtail.blocks.CharBlock(help_text='Enter a title for this HowTo step. You do not need to include a number in the title -- numbers will be added automatically in the template if the show numbers checkbox is checked.', max_length=500)), ('step_content', wagtail.blocks.StreamBlock([('text', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'h3', 'h4', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table_block', v1.atomic_elements.tables.AtomicTableBlock(table_options={'renderer': 'html'})), ('tip', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(features=['link', 'document-link'], label='Tip'))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))]))]))])))])), ('faq_schema', wagtail.blocks.StructBlock([('description', wagtail.blocks.RichTextBlock(blank=True, features=['ol', 'ul', 'bold', 'italic', 'link', 'document-link'], required=False)), ('questions', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('anchor_tag', wagtail.blocks.CharBlock(blank=True, help_text="Add an optional anchor link tag for this question. Tag should be unique and use dashes or underscores for separation instead of spaces (ie, 'question-one-tag')", max_length=500, required=False)), ('question', wagtail.blocks.CharBlock(max_length=500)), ('answer_content', wagtail.blocks.StreamBlock([('text', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(features=['bold', 'italic', 'h3', 'h4', 'link', 'ol', 'ul', 'document-link', 'image', 'embed'], label='Text'))])), ('table_block', v1.atomic_elements.tables.AtomicTableBlock(table_options={'renderer': 'html'})), ('tip', wagtail.blocks.StructBlock([('content', wagtail.blocks.RichTextBlock(features=['link', 'document-link'], label='Tip'))])), ('video_player', wagtail.blocks.StructBlock([('video_id', wagtail.blocks.RegexBlock(error_messages={'invalid': 'The YouTube video ID is in the wrong format.'}, help_text='Enter the YouTube video ID, which is located at the end of the video URL, after "v=". For example, the video ID for https://www.youtube.com/watch?v=1V0Ax9OIc84 is 1V0Ax9OIc84.', label='YouTube video ID', regex='^[\\w-]{11}$', required=False)), ('thumbnail_image', wagtail.images.blocks.ImageChooserBlock(help_text='Optional thumbnail image to show before and after the video plays. If the thumbnail image is not set here, the video player will default to showing the thumbnail that was set in (or automatically chosen by) YouTube.', required=False))]))]))])))]))], blank=True, verbose_name='Answer'),
),
]
14 changes: 6 additions & 8 deletions cfgov/ask_cfpb/models/answer_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
from django.utils.html import strip_tags
from django.utils.text import Truncator

from wagtail.admin.edit_handlers import (
from wagtail.admin.panels import (
FieldPanel,
MultiFieldPanel,
ObjectList,
StreamFieldPanel,
TabbedInterface,
)
from wagtail.core.fields import RichTextField, StreamField
from wagtail.snippets.edit_handlers import SnippetChooserPanel
from wagtail.fields import RichTextField, StreamField

from modelcluster.fields import ParentalKey, ParentalManyToManyField
from wagtailautocomplete.edit_handlers import AutocompletePanel
Expand Down Expand Up @@ -222,11 +220,11 @@ class AnswerPage(CFGOVPage):
classname="collapsible",
),
FieldPanel("share_and_print"),
StreamFieldPanel("notification"),
StreamFieldPanel("answer_content"),
FieldPanel("notification"),
FieldPanel("answer_content"),
MultiFieldPanel(
[
SnippetChooserPanel("related_resource"),
FieldPanel("related_resource"),
AutocompletePanel(
"related_questions", target_model="ask_cfpb.AnswerPage"
),
Expand Down Expand Up @@ -284,7 +282,7 @@ class AnswerPage(CFGOVPage):
)

sidebar_panels = [
StreamFieldPanel("sidebar"),
FieldPanel("sidebar"),
]

edit_handler = TabbedInterface(
Expand Down
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/models/blocks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from wagtail.core import blocks
from wagtail import blocks

from v1.atomic_elements import organisms
from v1.atomic_elements.schema import FAQ, HowTo, Tip
Expand Down
7 changes: 3 additions & 4 deletions cfgov/ask_cfpb/models/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from django.contrib.auth.models import User
from django.db import models

from wagtail.admin.edit_handlers import FieldPanel
from wagtail.core.fields import RichTextField
from wagtail.images.edit_handlers import ImageChooserPanel
from wagtail.admin.panels import FieldPanel
from wagtail.fields import RichTextField


ENGLISH_PARENT_SLUG = "ask-cfpb"
Expand Down Expand Up @@ -63,7 +62,7 @@ class Category(models.Model):
FieldPanel("name_es", classname="title"),
FieldPanel("slug_es"),
FieldPanel("intro_es"),
ImageChooserPanel("category_image"),
FieldPanel("category_image"),
]

def __str__(self):
Expand Down
15 changes: 7 additions & 8 deletions cfgov/ask_cfpb/models/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
from django.utils.translation import activate, deactivate_all
from django.utils.translation import gettext as _

from wagtail.admin.edit_handlers import (
from wagtail import blocks
from wagtail.admin.panels import (
FieldPanel,
InlinePanel,
MultiFieldPanel,
ObjectList,
StreamFieldPanel,
TabbedInterface,
)
from wagtail.contrib.routable_page.models import RoutablePageMixin, route
from wagtail.core import blocks
from wagtail.core.fields import StreamField
from wagtail.core.models import Orderable
from wagtail.fields import StreamField
from wagtail.models import Orderable

from modelcluster.fields import ParentalKey

Expand Down Expand Up @@ -141,7 +140,7 @@ class AnswerLandingPage(LandingPage):
Page type for Ask CFPB's landing page.
"""

content_panels = CFGOVPage.content_panels + [StreamFieldPanel("header")]
content_panels = CFGOVPage.content_panels + [FieldPanel("header")]
edit_handler = TabbedInterface(
[
ObjectList(content_panels, heading="Content"),
Expand Down Expand Up @@ -602,7 +601,7 @@ class ArticlePage(CFGOVPage):
heading="Inset links",
classname="collapsible",
),
StreamFieldPanel("sections"),
FieldPanel("sections"),
]

sidebar = StreamField(
Expand All @@ -623,7 +622,7 @@ class ArticlePage(CFGOVPage):
)

sidebar_panels = [
StreamFieldPanel("sidebar"),
FieldPanel("sidebar"),
]

edit_handler = TabbedInterface(
Expand Down
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/models/snippets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.db import models

from wagtail.core.fields import RichTextField
from wagtail.fields import RichTextField
from wagtail.snippets.models import register_snippet

from modelcluster.fields import ParentalKey
Expand Down
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/tests/models/test_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from django.urls import reverse
from django.utils import timezone, translation

from wagtail.core.models import Site
from wagtail.models import Site

from model_bakery import baker

Expand Down
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/tests/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.db import models
from django.test import TestCase, override_settings

from wagtail.core.models import Site
from wagtail.models import Site

from django_opensearch_dsl import fields
from django_opensearch_dsl.documents import Document
Expand Down
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/tests/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.http import HttpRequest
from django.test import TestCase

from wagtail.core.models import Page, Site
from wagtail.models import Page, Site

from ask_cfpb.models import Answer, AnswerLandingPage, AnswerPage
from ask_cfpb.wagtail_hooks import create_answer_id, editor_css
Expand Down
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.test import RequestFactory, TestCase
from django.utils import timezone

from wagtail.core.models import Site
from wagtail.models import Site
from wagtailsharing.models import SharingSite

from model_bakery import baker
Expand Down
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.shortcuts import get_object_or_404, redirect
from django.template.defaultfilters import slugify

from wagtail.core.models import Site
from wagtail.models import Site
from wagtailsharing.models import SharingSite
from wagtailsharing.views import ServeView

Expand Down
4 changes: 2 additions & 2 deletions cfgov/ask_cfpb/wagtail_hooks.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.conf import settings
from django.utils.html import format_html

from wagtail.core import hooks
from wagtail.core.models import Page
from wagtail import hooks
from wagtail.models import Page

from ask_cfpb.models import Answer, AnswerPage

Expand Down
4 changes: 2 additions & 2 deletions cfgov/cfgov/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# Application definition
INSTALLED_APPS = (
"permissions_viewer",
"wagtail.core",
"wagtail",
"wagtailadmin_overrides",
"wagtail.admin",
"wagtail.documents",
Expand Down Expand Up @@ -144,7 +144,7 @@
# for an overview of how Django templates work.

wagtail_extensions = [
"wagtail.core.jinja2tags.core",
"wagtail.jinja2tags.core",
"wagtail.admin.jinja2tags.userbar",
"wagtail.images.jinja2tags.images",
]
Expand Down
4 changes: 2 additions & 2 deletions cfgov/cfgov/settings/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

INSTALLED_APPS += (
"wagtail.contrib.settings",
"wagtail.tests.testapp",
"wagtail.test.testapp",
)

WAGTAILADMIN_RICH_TEXT_EDITORS = {
Expand All @@ -67,7 +67,7 @@
},
},
"custom": {
"WIDGET": "wagtail.tests.testapp.rich_text.CustomRichTextArea",
"WIDGET": "wagtail.test.testapp.rich_text.CustomRichTextArea",
},
}

Expand Down
2 changes: 1 addition & 1 deletion cfgov/core/management/commands/inactive_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.utils import timezone
from django.utils.formats import date_format

from wagtail.core.models import PageRevision
from wagtail.models import PageRevision


User = get_user_model()
Expand Down
Loading

0 comments on commit 7c5034c

Please sign in to comment.