A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
The goal is to have a new field in each comment to keep the number of responses it has received.
XtdComment method _calculate_thread_data updates nested_count values for all the comments related with the new incoming comment.
When a comment is removed from the tree, the function publish_or_unpublish_nested_comments updates nested_count in parent comments, so that it only represents those comments that have is_public = True.
A new command initialize_nested_count updates the nested_count field in the DB. The command is idempotent.
Two new migrations added.
Migration 0007 adds the new nested_count field.
Migration 0008 populates values in the nested_count field.
The goal is to have a new field in each comment to keep the number of responses it has received.
_calculate_thread_data
updatesnested_count
values for all the comments related with the new incoming comment.publish_or_unpublish_nested_comments
updatesnested_count
in parent comments, so that it only represents those comments that have is_public = True.initialize_nested_count
updates thenested_count
field in the DB. The command is idempotent.nested_count
field.nested_count
field.