我想导入countviews应用程序并将其嵌入到我的项目中。
我用的是django 1.10,python 2.7
我使用pip install django-hitcount并将hitcount添加到已安装的应用程序(myapp/setings.py)中。
当我运行服务器时,我会得到一个错误:
myapphitcount module not found.在MYAPP目录中,我没有hitcount文件夹。
我应该运行python manage.py startapp hitcount吗?
发布于 2016-11-01 10:15:51
好像你忘了加一个逗号:
INSTALLED_APPS = (
'myapp' # this must be followed by a comma
'hitcount'
)由于您没有添加逗号,python将两个字符串'myapp‘和'hitcount’连接到'myapphitcount‘中,因此django找不到这样的应用程序。
https://stackoverflow.com/questions/40302682
复制相似问题