Django无法运行测试服务器:ImportError:没有名为hitcount的模块



我是Django的新手,最近我一直在为一个团队项目使用它。我已经成功安装并正确配置了它-当我试图创建自己的测试项目时,它运行得很好,但当我开始在从我队友的repo中提取的项目上运行测试服务器时,它引发了以下错误:

Unhandled exception in thread started by <function wrapper at 0x10c9e6578>
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
    autoreload.raise_last_exception()
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/Library/Python/2.7/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named hitcount

有人能帮我找出解决办法吗?谢谢

尝试安装hitcount:

pip install django-hitcount

最新更新