Browse Source

Update imports that reference wagtail.core

wagtail.core has been deprecated since 3.0, outputs warnings as of 4.2, and is due for removal in 5.0.
Matt Westcott 2 years ago
parent
commit
4f76276c95

+ 1 - 1
bakerydemo/base/management/commands/create_random_data.py

@@ -5,8 +5,8 @@ from django.conf import settings
 from django.core.management.base import BaseCommand
 from django.utils import lorem_ipsum, timezone
 from django.utils.text import slugify
-from wagtail.core.rich_text import RichText
 from wagtail.images.models import Image
+from wagtail.rich_text import RichText
 from willow.image import Image as WillowImage
 
 from bakerydemo.base.models import FooterText, HomePage, Person, StandardPage

+ 3 - 3
bakerydemo/recipes/blocks.py

@@ -1,7 +1,5 @@
 from django import forms
-from wagtail.contrib.table_block.blocks import TableBlock
-from wagtail.contrib.typed_table_block.blocks import TypedTableBlock
-from wagtail.core.blocks import (
+from wagtail.blocks import (
     CharBlock,
     ChoiceBlock,
     FloatBlock,
@@ -10,6 +8,8 @@ from wagtail.core.blocks import (
     StreamBlock,
     StructBlock,
 )
+from wagtail.contrib.table_block.blocks import TableBlock
+from wagtail.contrib.typed_table_block.blocks import TypedTableBlock
 from wagtail.embeds.blocks import EmbedBlock
 from wagtail.images.blocks import ImageChooserBlock