A simple yet flexible threaded commenting system.
Project description
django-threadedcomments
threadedcomments is a Django application which allows for the simple creation of a threaded commenting system. Commenters can reply both to the original item, and reply to other comments as well.
The application is built on top of django_comments, which allows it to be easily extended by other modules.
Installation
Install the package via pip:
pip install django-threadedcomments
It’s preferred to install the module in a virtual environment.
Configuration
Add the following to settings.py:
INSTALLED_APPS += ( 'threadedcomments', 'django_comments', 'django.contrib.sites', ) COMMENTS_APP = 'threadedcomments'
By placing the threadedcomments app above the django.contrib.comments application, the placeholder comments/list.html template will already be replaced by a threaded view.
Make sure django_comments is configured in urls.py:
urlpatterns += patterns('', url(r'^articles/comments/', include('django_comments.urls')), )
Provide a template that displays the comments for the object (e.g. article or blog entry):
{% load threadedcomments_tags %} ... <h2>Comments for {{ object.title }}:</h2> {% render_comment_list for object %} {% render_comment_form for object %}
Template design
Naturally, it’s desirable to write your own version of comments/list.html in your project, or use one of the comments/app/list.html or comments/app/model/list.html overrides.
Make sure to override comments/base.html as well, so the other views of django_comments are displayed using your web site design. The other templates of django_comments are very plain as well on purpose (for example comments/posted.html), since these pages depend on the custom design of the web site.
See the provided example app for a basic configuration, including a JavaScript-based reply form that moves to the comment the visitor replies to.
Extending the module
The application is built on top of the standard django_comments framework, which supports various signals, and template overrides to customize the comments.
To customize django-threadedcomments, override the proper templates, or include the apps that provide the missing features. Front-end editing support for example, is left out on purpose. It belongs to the domain of moderation, and policies to know “who can do what”. That deserves to be in a separate application, it shouldn’t be in this application as it focuses on threading. The same applies to social media logins, comment subscriptions, spam protection and Ajax posting.
Note that the standard framework also supports moderation, flagging, and RSS feeds too. More documentation can be found at:
Some of the modules worth looking at are:
These modules can enhance the comments system even further.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-threadedcomments-2.0.tar.gz
.
File metadata
- Download URL: django-threadedcomments-2.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8d5bd087a24bde867cf5e3e4a62ca55ac60432fd47ee2ac6f35f350317deec9 |
|
MD5 | 9d1be1a392d89d169f42393a6de91388 |
|
BLAKE2b-256 | 400f5b713c0dcfff8688608682e94ad22b6aee2da176a47b11c12154b393dc56 |
File details
Details for the file django_threadedcomments-2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_threadedcomments-2.0-py2.py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd81da5c74e6bbaad9f9b450b03b6231278b6da376a1cd8f41eb3f36a934f5c |
|
MD5 | 0f7e8fe8b811a0141cc282a6aa569c6a |
|
BLAKE2b-256 | 91b8f7d9c42caaeaa7594cf0776acb237e9e2d18a4e86f9d24fcb3ac797635ad |