wagtail-non-admin-draftail icon indicating copy to clipboard operation
wagtail-non-admin-draftail copied to clipboard

wagtail 4.0 compatiability

Open rupertbaker opened this issue 3 years ago • 0 comments

I'm trying to upgrade to wagtail 4.0 but I'm seeing the following import error.

 File "/Users/rupertbaker/code/sharedgoals/venv/lib/python3.10/site-packages/non_admin_draftail/urls.py", line 16, in <module>
    from .views.image import image_chooser_and_upload, image_select_format
  File "/Users/rupertbaker/code/sharedgoals/venv/lib/python3.10/site-packages/non_admin_draftail/views/image.py", line 12, in <module>
    from wagtail.images.views.chooser import get_image_result_data
ImportError: cannot import name 'get_image_result_data' from 'wagtail.images.views.chooser' (/Users/rupertbaker/code/sharedgoals/venv/lib/python3.10/site-packages/wagtail/images/views/chooser.py)

After some investigation it appears that the get_image_result_data function has been replaced with a mixin. https://github.com/wagtail/wagtail/commit/dd892a650827770318d21e5984ca5d984a510655#diff-2dc885830e703d17176c1ca0570314d3873e71beb2d035932eed261c20f779e5

I assume there will be other things to update.

rupertbaker avatar Sep 01 '22 15:09 rupertbaker