- Django 1.7 or higher;
- The django-mptt 0.7
- The django-generic-helpers 0.4.2
Install package with pip (or easy_install) from PyPI:
$ pip install django-comments-threaded
or development version from github:
$ pip install -e git+https://github.com/marazmiki/django-comments-threaded#egg=django-comments-threaded
Then you need add both mptt and django_comments_threaded applications into your INSTALLED_APPS:
# settings.py
INSTALLED_APPS += (
'mptt',
'django_comments_threaded',
)
and add URL schema to your project urlpatterns in urls.py:
# urls.py
urlpatterns += [
url(r'^comments/', include('django_comments_threaded.urls')),
]
After this run migrations:
$ ./manage.py migrate
A
{# some_template.html #}
{% load comments_threaded_tags %}
{% render_comments_widget for model_object %}
In this case model_object is the variable taken from template context that refers to instance of model