Closed patrickohemeng closed 4 years ago
Same error for me after upgrade to Django 3.0.
Possible solutions are:
import six
instead of from django.utils import six
in resolvers.py and templatetags/hosts.pysix
importssix.iteritems(**kw)
- this is .items()
, but if you do this, you will loose python2 support.Also, after fixing this issue, new problem was arrived - import error for django.utils.lru_cache.lru_cache
in resolvers.py. Solution may be similar to previous - fixing import to from functools import lru_cache
(due to changes described in official django 3.0 release notes
Removed private Python 2 compatibility APIs
...
django.utils.lru_cache.lru_cache() - Alias of functools.lru_cache().
...
)
For myself i choose the second solution (failback imports) but i don't sure if that's a best decision. But if so, i can provide a PR.
Upd: similar issue - #98 and PR for it - #100 from @Djailla
thank you using 1 answer it works
duplicate of https://github.com/jazzband/django-hosts/issues/98
same error
I upgraded to Django 3.0 and on runserver this error is thrown
I think it has to do with Django 3.0 dropping dependency "six"