1
- .. _ref-contrib-comments-moderation:
2
-
3
1
==========================
4
2
Generic comment moderation
5
3
==========================
6
4
7
- :revision-up-to: 11321 (1.1 ) unfinished
5
+ :revision-up-to: 17812 (1.4 ) unfinished
8
6
9
7
.. module:: django.contrib.comments.moderation
10
8
:synopsis: Support for automatic comment moderation.
@@ -33,7 +31,7 @@ and uses a two-step process to enable moderation for any given model:
33
31
model class and the class which specifies its moderation options.
34
32
35
33
A simple example is the best illustration of this. Suppose we have the
36
- following model, which would represent entries in a weblog ::
34
+ following model, which would represent entries in a Weblog ::
37
35
38
36
from django.db import models
39
37
@@ -108,7 +106,9 @@ Built-in moderation options
108
106
If :attr:`auto_close_field` is used, this must specify the number
109
107
of days past the value of the field specified by
110
108
:attr:`auto_close_field` after which new comments for an object
111
- should be disallowed. Default value is ``None``.
109
+ should be disallowed. Allowed values are ``None``, 0 (which disallows
110
+ comments immediately), or any positive integer. Default value is
111
+ ``None``.
112
112
113
113
.. attribute:: email_notification
114
114
@@ -130,12 +130,18 @@ Built-in moderation options
130
130
If :attr:`auto_moderate_field` is used, this must specify the number
131
131
of days past the value of the field specified by
132
132
:attr:`auto_moderate_field` after which new comments for an object
133
- should be marked non-public. Default value is ``None``.
133
+ should be marked non-public. Allowed values are ``None``, 0 (which
134
+ moderates comments immediately), or any positive integer. Default
135
+ value is ``None``.
134
136
135
137
Simply subclassing :class:`CommentModerator` and changing the values of these
136
138
options will automatically enable the various moderation methods for any
137
139
models registered using the subclass.
138
140
141
+ .. versionchanged:: 1.3
142
+
143
+ ``moderate_after`` and ``close_after`` now accept 0 as a valid value.
144
+
139
145
Adding custom moderation methods
140
146
--------------------------------
141
147
0 commit comments