oscarmlage / django-cruds-adminlte

django-cruds is simple drop-in django app that creates CRUD for faster prototyping
BSD 3-Clause "New" or "Revised" License
424 stars 81 forks source link

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

Open peter-dinh opened 4 years ago

peter-dinh commented 4 years ago

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 commented 4 years ago

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

hbrunacci commented 3 years ago

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 commented 3 years ago

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

madzul commented 2 years ago

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

oscarmlage commented 2 years ago

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 commented 1 year ago

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