PageRenderTime 27ms CodeModel.GetById 17ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/docs/ref/contrib/comments/models.txt

https://code.google.com/p/mango-py/
Plain Text | 80 lines | 49 code | 31 blank | 0 comment | 0 complexity | bcee19fd79bef2b9ee95c4aef55f867c MD5 | raw file
 1===========================
 2The built-in comment models
 3===========================
 4
 5.. module:: django.contrib.comments.models
 6   :synopsis: The built-in comment models
 7
 8.. class:: Comment
 9
10    Django's built-in comment model. Has the following fields:
11
12    .. attribute:: content_object
13
14        A :class:`~django.contrib.contettypes.generic.GenericForeignKey`
15        attribute pointing to the object the comment is attached to. You can use
16        this to get at the related object (i.e. ``my_comment.content_object``).
17
18        Since this field is a
19        :class:`~django.contrib.contettypes.generic.GenericForeignKey`, it's
20        actually syntactic sugar on top of two underlying attributes, described
21        below.
22
23    .. attribute:: content_type
24
25        A :class:`~django.db.models.ForeignKey` to
26        :class:`~django.contrib.contenttypes.models.ContentType`; this is the
27        type of the object the comment is attached to.
28
29    .. attribute:: object_pk
30
31        A :class:`~django.db.models.TextField` containing the primary
32        key of the object the comment is attached to.
33
34    .. attribute:: site
35
36        A :class:`~django.db.models.ForeignKey` to the
37        :class:`~django.contrib.sites.models.Site` on which the comment was
38        posted.
39
40    .. attribute:: user
41
42        A :class:`~django.db.models.ForeignKey` to the
43        :class:`~django.contrib.auth.models.User` who posted the comment.
44        May be blank if the comment was posted by an unauthenticated user.
45
46    .. attribute:: user_name
47
48        The name of the user who posted the comment.
49
50    .. attribute:: user_email
51
52        The email of the user who posted the comment.
53
54    .. attribute:: user_url
55
56        The URL entered by the person who posted the comment.
57
58    .. attribute:: comment
59
60        The actual content of the comment itself.
61
62    .. attribute:: submit_date
63
64        The date the comment was submitted.
65
66    .. attribute:: ip_address
67
68        The IP address of the user posting the comment.
69
70    .. attribute:: is_public
71
72        ``False`` if the comment is in moderation (see
73        :doc:`/ref/contrib/comments/moderation`); If ``True``, the comment will
74        be displayed on the site.
75
76    .. attribute:: is_removed
77
78        ``True`` if the comment was removed. Used to keep track of removed
79        comments instead of just deleting them.
80