django-comments-xtd extends the built-in Django’s Comments Framework with:
- Add django.contrib.comments and django_comments_xtd to INSTALLED_APPS
- Add COMMENTS_APP = "django_comments_xtd"
- Add COMMENTS_XTD_MAX_THREAD_LEVEL = N, being N the maximum level up to which comments can be threaded:
- When N = 0: comments are plain, no threads
- When N = 1: comments at level 0 might be commented
- When N = K: comments up until level K-1 might be commented
It can be set up on a per <app>.<model> basis too. Read more in the Tutorial and see it in action in the multiple demo site in Demo projects.
- Customize your project’s email settings.
- Get the dependencies: django-markup
- And add django_markup to INSTALLED_APPS
- Load the comments templatetag and use their tags:
- {% get_comment_count for object as comment_count %}
- {% render_comment_list for object %} (uses comments/list.html)
- {% render_comment_form for post %} (uses comments/form.html and comments/preview.html)
- Load the comments_xtd templatetag and use their tags and filter:
- {% get_xtdcomment_count as comments_count for blog.story blog.quote %}
- {% render_last_xtdcomments 5 for blog.story blog.quote using "blog/comment.html" %}
- {% get_last_xtdcomments 5 as last_comments for blog.story blog.quote %}
- Filter render_markup_comment: {{ comment.comment|render_markup_comment }}. You may want to copy and change the template comments/list.html from django.contrib.comments to use this filter.