2015-07-01 36 views
0

我在使用新的django_comments时遇到错误,其中replaceddjango.contrib.comments。有关如何解决此错误的任何想法?ImportError:没有名为comments.models的模块

我在django-fluent-comments上安装了评论应用django-threadedcomments - 这完全受支持。

File "/.../lib/python2.7/site-packages/threadedcomments/models.py", line 2, in <module> 
from django.contrib.comments.models import Comment 
ImportError: No module named comments.models 

settings.py

INSTALLED_APPS = (
    ## comments apps start 
    'threadedcomments', 
    'django.contrib.sites', 
    'django_comments', 
    'fluent_comments', 
    'crispy_forms', 
    ## comments apps end 
) 
+0

尝试使用最新开发版本django_comments – TheGeorgeous

回答

3

试试这个,我想你错过了这个:

pip install django-contrib-comments 

,并使用最新的代码

from django.contrib.comments.models import Comment # old 
from django_comments.models import Comment # new 
+1

你说得对。我不得不手动编辑第三方应用程序。 – Onichan

相关问题