Porting to django_comments from django.contrib.comments — Django Comments 1.5 documentation

### Navigation

- index
- modules |
- previous |
- Django Comments 1.5 documentation »

# Porting to `django_comments` from `django.contrib.comments`

To move from `django.contrib.comments` to `django_comments`, follow these steps:

1. Install the comments app by running `pip install django-contrib-comments`.

2. In `INSTALLED_APPS`, replace `'django.contrib.comments'` with `'django_comments'`.

       INSTALLED_APPS = (
           ...
           'django_comments',
           ...
       )

3. In your project’s `urls.py`, replace the url include `django.contrib.comments.urls` with `'django_comments.urls'`:

       urlpatterns = patterns('',
           ...
           (r'^comments/', include('django_comments.urls')),
           ...
       )

4. If your project had customized the comments framework, then update your imports to use the `django_comments` module instead of `django.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 CommentForm # new

### Navigation

- index
- modules |
- previous |
- Django Comments 1.5 documentation »