248 |
248 |
249 An instance of this class will maintain a list of one or more |
249 An instance of this class will maintain a list of one or more |
250 models registered for comment moderation, and their associated |
250 models registered for comment moderation, and their associated |
251 moderation classes, and apply moderation to all incoming comments. |
251 moderation classes, and apply moderation to all incoming comments. |
252 |
252 |
253 To register a model, obtain an instance of ``CommentModerator`` |
253 To register a model, obtain an instance of ``Moderator`` (this |
254 (this module exports one as ``moderator``), and call its |
254 module exports one as ``moderator``), and call its ``register`` |
255 ``register`` method, passing the model class and a moderation |
255 method, passing the model class and a moderation class (which |
256 class (which should be a subclass of ``CommentModerator``). Note |
256 should be a subclass of ``CommentModerator``). Note that both of |
257 that both of these should be the actual classes, not instances of |
257 these should be the actual classes, not instances of the classes. |
258 the classes. |
|
259 |
258 |
260 To cease moderation for a model, call the ``unregister`` method, |
259 To cease moderation for a model, call the ``unregister`` method, |
261 passing the model class. |
260 passing the model class. |
262 |
261 |
263 For convenience, both ``register`` and ``unregister`` can also |
262 For convenience, both ``register`` and ``unregister`` can also |