Porting to django_comments from django.contrib.commentsΒΆ
To move from django.contrib.comments to django_comments,
follow these steps:
Install the comments app by running
pip install django-contrib-comments.In
INSTALLED_APPS, replace'django.contrib.comments'with'django_comments'.INSTALLED_APPS = ( ... 'django_comments', ... )
In your project’s
urls.py, replace the url includedjango.contrib.comments.urlswith'django_comments.urls':urlpatterns = [ ... url(r'^comments/', include('django_comments.urls')), ... ]
If your project had customized the comments framework, then update your imports to use the
django_commentsmodule instead ofdjango.contrib.comments. For example:from django.contrib.comments.models import Comment # old from django_comments.models import Comment # new from django.contrib.comments.forms import CommentForm # old from django_comments.forms import CommentForm # new