Django Hit Count ImportError

帅比萌擦擦* 提交于 2020-01-16 09:59:28

问题


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!

来源:https://stackoverflow.com/questions/59720442/django-hit-count-importerror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!