wagtailstreamforms icon indicating copy to clipboard operation
wagtailstreamforms copied to clipboard

Update for Wagtail 2.16.x and Django 4.0

Open funkhaus-phil opened this issue 3 years ago • 2 comments

Hello lovely wagtailstreamforms people,

Wagtail released version 2.16.x wich supports Django 4.0.x First of all this project does not support the new Wagtail release yet which would be very nice. When thats working it would be fantastic if Django 4.0.x would be supported as well, since there are some changes on djangos site as well that break the project.

Here are the errors i am encountering while trying a fully updated environment:

Wagtail: ERROR: wagtailstreamforms 3.17 has requirement wagtail<2.16,>=2, but you'll have wagtail 2.16.1 which is incompatible.

Django:

site-packages/wagtailstreamforms/models/file.py", line 3, in <module>
    from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'

funkhaus-phil avatar Mar 02 '22 12:03 funkhaus-phil

I tried to rewrite the some code for this very problem. It works, but badly... [https://github.com/ZhdanDesign/wagtailstreamforms_D4WT2]

ZhdanDesign avatar Mar 02 '22 19:03 ZhdanDesign

@ZhdanDesign might have been better to add to this project instead of opening an own one since people are actively working on it.

it seems you got the same issue as me and are looking for a hotfix. here is my suggestion for you even tho it's not the recommended way to handle upgrades: if you need an integration in your own updated system it might be okay to not use django 4.0.x, but wagtail 2.16.x, yet and use the legacy pip installation process for your requirements or the new one if that does not abort your installation process. this way you have no actual errors, the package is working and all you get is a warning that your version of wagtailstreamforms is not supported. just like in this screenshot: Bildschirmfoto 2022-03-02 um 21 06 40

the problem i see with your own git project here is, that its not clear what you worked on, since you copied all files, edited them and made your first commit after the change happened

funkhaus-phil avatar Mar 02 '22 20:03 funkhaus-phil