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 working django 3x:from django.utils import six #141

Open
peter-dinh opened this issue Apr 7, 2020 · 6 comments
Open

Not working django 3x:from django.utils import six #141

peter-dinh opened this issue Apr 7, 2020 · 6 comments
Assignees

Comments

@peter-dinh
Copy link

django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'cruds_adminlte.templatetags.crud_tags': cannot import name 'six'

from django.utils import six Not working django 3x

@oscarmlage oscarmlage self-assigned this Jun 8, 2020
@oscarmlage
Copy link
Owner

Not tested myself with Django 3.x but I will, thanks for noticing.

@hbrunacci
Copy link

hi,you can fix de problem installing six and changing line 11 on templatestags/crud_tags.py line 11

  1. pip install six
  2. change templatestags/crud_tags.py line 11, from 'from django.utils import six' to 'import six'

the explanation of this error is:
The Django 3.0.0 release notes specify that certain private Python 2 compatibility APIs were removed. Among those was django.utils.six.

@norrsken-jagare
Copy link

Also having the same problem. The fix by @hbrunacci worked for me.

@madzul
Copy link

madzul commented Sep 15, 2021

how to overwrite from django.utils import six with import six if we use/install cruds-adminlte from pip?

@oscarmlage
Copy link
Owner

how to overwrite from django.utils import six with import six if we use/install cruds-adminlte from pip?

I'm about to open a new branch in order to start working in Django 3.x integration, hopefully we will have a new release soon. About overwriting the import I'd say it's a good advice if you're using this package cloning the repo.

If you're using it via pip I'd say you can go to the place where pip stores the source (your env place + lib/python3.x/site-packages/) and change it there but it's not a good practice at all as it would be overwritten again if you update or rebuild the environment.

@Seykotron
Copy link

I think this is fixed in the tag 17, why dont ship it to pip?

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

6 participants