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

fix: Django 3.0 deprecation import fix #266

Merged

Conversation

igor-yamshchykov
Copy link
Contributor

@igor-yamshchykov igor-yamshchykov commented Dec 2, 2019

According to Django 3 release
both django.utils.six and django.contrib.staticfiles.templatetags.staticfiles.static() are removed

This PR should fix ImportErrors

@v1kku
Copy link

v1kku commented Dec 3, 2019

I think the it should try to import from the new location first then fallback to the old one. Doing it the other way round will still raise warnings.

e.g

try:
    from django.templatetags.static import static
except ImportError:
    from django.contrib.staticfiles.templatetags import static

There's also another static import in tests/tests.py and a few others for six.

@igor-yamshchykov
Copy link
Contributor Author

@v1kku thanks, added

@domdinicola
Copy link

I think we should get rid of things which are not supported anymore (like six)

@domdinicola
Copy link

#266 hope this fixes it

@Gagaro
Copy link
Member

Gagaro commented Dec 6, 2019

Django 1.11 is still supported so we should keep using six for the moment.

Thanks for the PR 👍 .

@Gagaro Gagaro merged commit 2f3721a into makinacorpus:master Dec 6, 2019
@Gagaro Gagaro mentioned this pull request Dec 6, 2019
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

Successfully merging this pull request may close these issues.

None yet

4 participants