all repos — comments @ main

django app for embedding comment threads in a static site via iframes

update email address
Derek Stevens
added linebreaksbr filter to comment data field
Derek Stevens
changed comment_data to textfield
Derek Stevens

[[ comments ]]

- a simple embeddable comment system for Django -


comments is an unceremoniously named comment system created with the Django framework with the intention of adding comment capabilities to an otherwise statically generated site. Together with my ayanami CMS this provides a featureful and lightweight web platform for content generation, sharing, and discussion.


comments is a Django app. Thus, to use it, drop the comments directory into your django project directory, include the into the global one, and probably copy or move the to the django global directory, editing it to match your djang project’s name.

Once your django setup is done, you can call create * from your static site generator to create comment threads, and embed iframes pointing to /your/django/dir/comments/thread in your page. To manage comments, you can use the vanilla django admin console. You can start at a thread, and from the root_comment through each next comment you can use the change directive to follow the comment thread to the comment of interest; or you can manage by comment directly. Comments can be hidden to avoid manually the relinking the threads after actually deleting them.


Comments are stored in a linked list.

Each thread is just: * thread_id: a unique identifier (primary key) for the thread * root_comment: the first comment in the thread; None if empty

And each comment is structured as: * comment_author * comment_author_email: this is only used internally for accountability reasons * comment_date: this is automatically generated when the comment is created * hidden: a boolean flag whether to show the comment or not * comment_data: the textual content of the comment * next: the next comment in the thread; None if the last


comments is released under a 2-clause BSD License (LICENSE file). Use it however you want as long as you reproduce the LICENSE in the distribution and allow access to the source.

git clone