all repos — comments @ main

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

6607ea6d
update email address
Iris Lightshard nilix@nilfm.cc
6ba60b2f
added linebreaksbr filter to comment data field
Iris Lightshard nilix@nilfm.cc
33c508d1
changed comment_data to textfield
Iris Lightshard nilix@nilfm.cc

[[ comments ]]

- a simple embeddable comment system for Django -

about

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.

usage

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

Once your django setup is done, you can call ext.py 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.

data

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

licensing

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.

clone
git clone https://hacklab.nilfm.cc/comments