wagtail-experiments icon indicating copy to clipboard operation
wagtail-experiments copied to clipboard

Not compatibe with Django 3

Open Koed00 opened this issue 5 years ago • 4 comments

Because of this deprecated import, experiments is currently not compatible with Django 3. Even though Wagtail itself is.

from django.utils.encoding import python_2_unicode_compatible

Koed00 avatar Feb 07 '20 11:02 Koed00

Any updates regarding this issue?

noobmaster19 avatar May 08 '20 08:05 noobmaster19

Hi both,

while not a complicated fix, we could use any help we can get, we will welcome a PR sorting this out.

Thank you

zerolab avatar May 11 '20 08:05 zerolab

God is good, so far replacing the import line in models.py this way allows the code to run.

try:
    from django.utils.encoding import python_2_unicode_compatible
except ImportError:
    def python_2_unicode_compatible(aleluya):
        return aleluya

I will work on a PR after verifying it works God willing and if we live in Jesus name

loveJesus avatar Jun 02 '20 23:06 loveJesus

God is good, another issue is to change {% load i18n staticfiles %} to {% load i18n static %} in line 2 of templates/experiments/report.html ; However this works only from Django 1.10 onwards. With my current knowledge of Django i do not see an easy way to detect the Django version and require one or the other conditionally. God guide us and bless you in Jesus name

loveJesus avatar Jun 03 '20 00:06 loveJesus

Fixed in #33

gasman avatar Aug 10 '23 12:08 gasman