Avoided mixing dates and datetimes in the examples.

Refs #16023.
This commit is contained in:
Aymeric Augustin 2012-09-08 11:00:04 -04:00
parent b7d3b057f3
commit e69348b4e7
8 changed files with 34 additions and 23 deletions

View file

@ -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