Discussions

This document explains the available functionality related to commenting on content objects in Courant News. Such functionality generally builds upon Django’s comments framework.

Moderation & Visibility

Courant News supports the ability to set comment moderation settings on a per-object level. Site administrators can define a set of CommentOptions which comprise of the different sets of comment moderations settings that will be used throughout the site. Default CommentOptions can be set for each ContentType.

The CommentOptions Model

class models.CommentOptions

Each instance of CommentOptions has four settings which define how commenting and comment moderation will work for the associated content object.

allow_anonymous
A boolean flag that determines whether non-authenticated users will be allowed to post a comment. Templates should check this value to determine whether or not to show the comment submit form to such users.
moderate_anonymous_only
A boolean flag that allows authenticated users’ comments to automatically be approved upon submission. Non-authenticated (anonymous) users will need to have their comments moderated before they will appear publicly.
moderate_after
The number of days after which submitted comments will have to be moderated before becoming publicly visible. To moderate comment posts by default, set this field to zero.
close_after
The number of days after which new comments will no longer be accepted. Set to zero to disable this behavior and allow new comments indefinitely.

The DefaultCommentOption Model

class models.DefaultCommentOption

Instances of DefaultCommentOption defines the default CommentOptions for a given ContentType.

content_type
ContentType to define the default value for.
options
The CommentOptions that will be used as the default for this content_type.

Table Of Contents

This Page