The built-in comment models¶
- class Comment¶
Django’s built-in comment model. Has the following fields:
A GenericForeignKey attribute pointing to the object the comment is attached to. You can use this to get at the related object (i.e. my_comment.content_object).
Since this field is a GenericForeignKey, it’s actually syntactic sugar on top of two underlying attributes, described below.
The name of the user who posted the comment.
The email of the user who posted the comment.
The URL entered by the person who posted the comment.
The actual content of the comment itself.
The date the comment was submitted.
The IP address of the user posting the comment.
False if the comment is in moderation (see Generic comment moderation); If True, the comment will be displayed on the site.
True if the comment was removed. Used to keep track of removed comments instead of just deleting them.