summaryrefslogtreecommitdiff
path: root/docs/ref/contrib/comments
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-09-08 11:00:04 -0400
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-09-08 11:00:04 -0400
commite69348b4e7f07ef927edaecc7126901fc91c79d0 (patch)
treee3bf89867455ee918f69245a3d4c7be5535ad155 /docs/ref/contrib/comments
parentb7d3b057f32ed6aa7ee0941e1f0dec9d3e9223a3 (diff)
Avoided mixing dates and datetimes in the examples.
Refs #16023.
Diffstat (limited to 'docs/ref/contrib/comments')
-rw-r--r--docs/ref/contrib/comments/moderation.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/ref/contrib/comments/moderation.txt b/docs/ref/contrib/comments/moderation.txt
index 4f4b326cb2..f03c7fda0d 100644
--- a/docs/ref/contrib/comments/moderation.txt
+++ b/docs/ref/contrib/comments/moderation.txt
@@ -32,11 +32,11 @@ A simple example is the best illustration of this. Suppose we have the
following model, which would represent entries in a Weblog::
from django.db import models
-
+
class Entry(models.Model):
title = models.CharField(maxlength=250)
body = models.TextField()
- pub_date = models.DateTimeField()
+ pub_date = models.DateField()
enable_comments = models.BooleanField()
Now, suppose that we want the following steps to be applied whenever a
@@ -55,11 +55,11 @@ Accomplishing this is fairly straightforward and requires very little
code::
from django.contrib.comments.moderation import CommentModerator, moderator
-
+
class EntryModerator(CommentModerator):
email_notification = True
enable_field = 'enable_comments'
-
+
moderator.register(Entry, EntryModerator)
The :class:`CommentModerator` class pre-defines a number of useful moderation