Skip to content

Commit d07911d

Browse files
committed
going after wagtail4
1 parent 820dab7 commit d07911d

File tree

17 files changed

+96
-96
lines changed

17 files changed

+96
-96
lines changed

example/migrations/0001_initial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from django.db import migrations, models
44
import django.db.models.deletion
5-
import wagtail.core.blocks
6-
import wagtail.core.fields
5+
import wagtail.blocks
6+
import wagtail.fields
77
import wagtailstreamforms.blocks
88

99

@@ -20,7 +20,7 @@ class Migration(migrations.Migration):
2020
name='BasicPage',
2121
fields=[
2222
('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')),
23-
('body', wagtail.core.fields.StreamField((('rich_text', wagtail.core.blocks.RichTextBlock()), ('form', wagtail.core.blocks.StructBlock((('form', wagtailstreamforms.blocks.FormChooserBlock()), ('form_action', wagtail.core.blocks.CharBlock(help_text='The form post action. "" or "." for the current page or a url', required=False)), ('form_reference', wagtailstreamforms.blocks.InfoBlock(help_text='This form will be given a unique reference once saved', required=False)))))))),
23+
('body', wagtail.fields.StreamField((('rich_text', wagtail.blocks.RichTextBlock()), ('form', wagtail.blocks.StructBlock((('form', wagtailstreamforms.blocks.FormChooserBlock()), ('form_action', wagtail.blocks.CharBlock(help_text='The form post action. "" or "." for the current page or a url', required=False)), ('form_reference', wagtailstreamforms.blocks.InfoBlock(help_text='This form will be given a unique reference once saved', required=False)))))))),
2424
],
2525
options={
2626
'abstract': False,

example/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from django.db import models
22

3-
from wagtail.admin.edit_handlers import StreamFieldPanel
4-
from wagtail.core import blocks
5-
from wagtail.core.fields import StreamField
6-
from wagtail.core.models import Page
3+
from wagtail.admin.panels import StreamFieldPanel
4+
from wagtail import blocks
5+
from wagtail.fields import StreamField
6+
from wagtail.models import Page
77
from wagtailstreamforms.blocks import WagtailFormBlock
88
from wagtailstreamforms.models.abstract import AbstractFormSetting
99

example/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'django.contrib.staticfiles',
2828

2929
# wagtail
30-
'wagtail.core',
30+
'wagtail',
3131
'wagtail.admin',
3232
'wagtail.documents',
3333
'wagtail.snippets',

example/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from django.contrib import admin
55

66
from wagtail.admin import urls as wagtailadmin_urls
7-
from wagtail.core import urls as wagtail_urls
7+
from wagtail import urls as wagtail_urls
88
from wagtail.documents import urls as wagtaildocs_urls
99

1010

example/wagtailstreamforms_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.contrib.auth.models import User
33

44
from captcha.fields import ReCaptchaField
5-
from wagtail.core import blocks
5+
from wagtail import blocks
66
from wagtailstreamforms.fields import BaseField, register
77

88

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
install_requires = [
21-
"wagtail>=2,<=3.0.3",
21+
"wagtail>=2,<=4.1",
2222
"Unidecode>=0.04.14,<2.0",
2323
]
2424

tests/hooks/test_process_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.test import override_settings
33
from django.test.client import Client
44
from mock import patch
5-
from wagtail.core.models import Page
5+
from wagtail.models import Page
66

77
from wagtailstreamforms.models import Form
88
from wagtailstreamforms.wagtail_hooks import process_form

tests/models/test_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.db import models
33
from django.test import override_settings
44
from django.utils.translation import gettext_lazy as _
5-
from wagtail.core.models import Page
5+
from wagtail.models import Page
66

77
from wagtailstreamforms.conf import get_setting
88
from wagtailstreamforms.fields import HookSelectField

tests/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"django.contrib.messages",
1515
"django.contrib.staticfiles",
1616
# wagtail
17-
"wagtail.core",
17+
"wagtail",
1818
"wagtail.admin",
1919
"wagtail.documents",
2020
"wagtail.snippets",

tests/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django.contrib import admin
22
from django.urls import include, re_path
33
from wagtail.admin import urls as wagtailadmin_urls
4-
from wagtail.core import urls as wagtail_urls
4+
from wagtail import urls as wagtail_urls
55

66
urlpatterns = [
77
re_path(r"^admin/", admin.site.urls),

0 commit comments

Comments
 (0)