Django Hit Count ImportError

355 views Asked by At

I am trying to use the django hitcount, and I am following the only tutorial out there for it https://django-hitcount.readthedocs.io/en/latest/installation.html, and I am getting stuck on step 2--adding hitcount to the list of installed apps. When I do that, and try and run the server, I get the following error:

ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding'

settings.py

INSTALLED_APPS = [
    'hitcount',
    'auctionitem.apps.AuctionitemConfig',
    'blog.apps.BlogConfig',
    'users.apps.UsersConfig',
    'crispy_forms',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

Why!

1

There are 1 answers

0
Tim Wilson On

The newest version of django-hitcount now supports Django 3.x.