Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not supporting Django 3.0.x #207

Open
moojen opened this issue Apr 15, 2020 · 1 comment
Open

Not supporting Django 3.0.x #207

moojen opened this issue Apr 15, 2020 · 1 comment

Comments

@moojen
Copy link

moojen commented Apr 15, 2020

The forms.py still uses some "old" code from Django 2.x, which has been deprecated in 3.0.

I got the following errors and have added my solution to them, which made the app work (but not thoroughly tested).

  • from django.contrib.staticfiles.templatetags.staticfiles import static

  • ModuleNotFoundError: No module named 'django.contrib.staticfiles.templatetags'
    Solution: replace first line with from django.templatetags.static import static (and add an if statement based on the Django version)

  • from django.utils.lru_cache import lru_cache

  • ModuleNotFoundError: No module named 'django.utils.lru_cache'
    Solution: replace first line with from functools import lru_cache (and add an if statement based on the Django version)

Hope this helps anyone!

@moojen
Copy link
Author

moojen commented May 5, 2020

In addition to the above, in the second line it still mentions:
load staticfiles which should be load static as of 3.0 as staticfiles is removed

This is happening at the following pages:
../wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/base.html
../wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html
../wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant