|
1 |
| -=========================== |
2 |
| -The built-in comment models |
3 |
| -=========================== |
| 1 | +.. =========================== |
| 2 | + The built-in comment models |
| 3 | + =========================== |
4 | 4 |
|
5 |
| -:revision-up-to: 17812 (1.4) unfinished |
| 5 | +======================== |
| 6 | +組み込みのコメントモデル |
| 7 | +======================== |
| 8 | + |
| 9 | +:revision-up-to: 17812 (1.4) |
6 | 10 |
|
7 | 11 | .. module:: django.contrib.comments.models
|
8 | 12 | :synopsis: The built-in comment models
|
9 | 13 |
|
10 | 14 | .. class:: Comment
|
11 | 15 |
|
12 |
| - Django's built-in comment model. Has the following fields: |
| 16 | + .. Django's built-in comment model. Has the following fields: |
| 17 | + |
| 18 | + Django の組み込みコメントモデルです。次のフィールドを持ちます: |
13 | 19 |
|
14 | 20 | .. attribute:: content_object
|
15 | 21 |
|
16 |
| - A :class:`~django.contrib.contettypes.generic.GenericForeignKey` |
17 |
| - attribute pointing to the object the comment is attached to. You can use |
18 |
| - this to get at the related object (i.e. ``my_comment.content_object``). |
| 22 | + .. A :class:`~django.contrib.contettypes.generic.GenericForeignKey` |
| 23 | + attribute pointing to the object the comment is attached to. You can use |
| 24 | + this to get at the related object (i.e. ``my_comment.content_object``). |
| 25 | + |
| 26 | + コメントが結びつけられたオブジェクトを指す |
| 27 | + :class:`~django.contrib.contettypes.generic.GenericForeignKey` |
| 28 | + 属性です。これを使うことで関連づけられたオブジェクトを取得できます |
| 29 | + (たとえば ``my_comment.content_object``)。 |
| 30 | + |
| 31 | + .. Since this field is a |
| 32 | + :class:`~django.contrib.contettypes.generic.GenericForeignKey`, it's |
| 33 | + actually syntactic sugar on top of two underlying attributes, described |
| 34 | + below. |
19 | 35 |
|
20 |
| - Since this field is a |
21 |
| - :class:`~django.contrib.contettypes.generic.GenericForeignKey`, it's |
22 |
| - actually syntactic sugar on top of two underlying attributes, described |
23 |
| - below. |
| 36 | + このフィールドは |
| 37 | + :class:`~django.contrib.contettypes.generic.GenericForeignKey` なので、 |
| 38 | + 実際には以下で説明する 2 つの属性のシンタックスシュガーです。 |
24 | 39 |
|
25 | 40 | .. attribute:: content_type
|
26 | 41 |
|
27 |
| - A :class:`~django.db.models.ForeignKey` to |
28 |
| - :class:`~django.contrib.contenttypes.models.ContentType`; this is the |
29 |
| - type of the object the comment is attached to. |
| 42 | + .. A :class:`~django.db.models.ForeignKey` to |
| 43 | + :class:`~django.contrib.contenttypes.models.ContentType`; this is the |
| 44 | + type of the object the comment is attached to. |
| 45 | + |
| 46 | + :class:`~django.contrib.contenttypes.models.ContentType` への |
| 47 | + :class:`~django.db.models.ForeignKey` です。これはコメントが |
| 48 | + 結びつけられたオブジェクトのタイプです。 |
30 | 49 |
|
31 | 50 | .. attribute:: object_pk
|
32 | 51 |
|
33 |
| - A :class:`~django.db.models.TextField` containing the primary |
34 |
| - key of the object the comment is attached to. |
| 52 | + .. A :class:`~django.db.models.TextField` containing the primary |
| 53 | + key of the object the comment is attached to. |
| 54 | + |
| 55 | + コメントが関連づけられたオブジェクトのプライマリキーを含んだ |
| 56 | + :class:`~django.db.models.TextField` です。 |
35 | 57 |
|
36 | 58 | .. attribute:: site
|
37 | 59 |
|
38 |
| - A :class:`~django.db.models.ForeignKey` to the |
39 |
| - :class:`~django.contrib.sites.models.Site` on which the comment was |
40 |
| - posted. |
| 60 | + .. A :class:`~django.db.models.ForeignKey` to the |
| 61 | + :class:`~django.contrib.sites.models.Site` on which the comment was |
| 62 | + posted. |
| 63 | + |
| 64 | + コメントが投稿された :class:`~django.contrib.sites.models.Site` への |
| 65 | + :class:`~django.db.models.ForeignKey` です。 |
41 | 66 |
|
42 | 67 | .. attribute:: user
|
43 | 68 |
|
44 |
| - A :class:`~django.db.models.ForeignKey` to the |
45 |
| - :class:`~django.contrib.auth.models.User` who posted the comment. |
46 |
| - May be blank if the comment was posted by an unauthenticated user. |
| 69 | + .. A :class:`~django.db.models.ForeignKey` to the |
| 70 | + :class:`~django.contrib.auth.models.User` who posted the comment. |
| 71 | + May be blank if the comment was posted by an unauthenticated user. |
| 72 | + |
| 73 | + コメントを投稿した :class:`~django.contrib.auth.models.User` への |
| 74 | + :class:`~django.db.models.ForeignKey` です。コメントが認証されていない |
| 75 | + ユーザによって登録された場合は空になるかもしれません。 |
47 | 76 |
|
48 | 77 | .. attribute:: user_name
|
49 | 78 |
|
50 |
| - The name of the user who posted the comment. |
| 79 | + .. The name of the user who posted the comment. |
| 80 | + |
| 81 | + コメントを投稿したユーザの名前です。 |
51 | 82 |
|
52 | 83 | .. attribute:: user_email
|
53 | 84 |
|
54 |
| - The email of the user who posted the comment. |
| 85 | + .. The email of the user who posted the comment. |
| 86 | + |
| 87 | + コメントを投稿したユーザの Email アドレスです。 |
55 | 88 |
|
56 | 89 | .. attribute:: user_url
|
57 | 90 |
|
58 |
| - The URL entered by the person who posted the comment. |
| 91 | + .. The URL entered by the person who posted the comment. |
| 92 | + |
| 93 | + コメントを投稿したユーザが入力した URL です。 |
59 | 94 |
|
60 | 95 | .. attribute:: comment
|
61 | 96 |
|
62 |
| - The actual content of the comment itself. |
| 97 | + .. The actual content of the comment itself. |
| 98 | + |
| 99 | + コメントの内容そのものです。 |
63 | 100 |
|
64 | 101 | .. attribute:: submit_date
|
65 | 102 |
|
66 |
| - The date the comment was submitted. |
| 103 | + .. The date the comment was submitted. |
| 104 | + |
| 105 | + コメントが送信された日付です。 |
67 | 106 |
|
68 | 107 | .. attribute:: ip_address
|
69 | 108 |
|
70 |
| - The IP address of the user posting the comment. |
| 109 | + .. The IP address of the user posting the comment. |
| 110 | + |
| 111 | + コメント投稿ユーザの IP アドレスです。 |
71 | 112 |
|
72 | 113 | .. attribute:: is_public
|
73 | 114 |
|
74 |
| - ``False`` if the comment is in moderation (see |
75 |
| - :doc:`/ref/contrib/comments/moderation`); If ``True``, the comment will |
76 |
| - be displayed on the site. |
| 115 | + .. ``False`` if the comment is in moderation (see |
| 116 | + :doc:`/ref/contrib/comments/moderation`); If ``True``, the comment will |
| 117 | + be displayed on the site. |
| 118 | + |
| 119 | + コメントがモデレーション待ち (:doc:`/ref/contrib/comments/moderation` |
| 120 | + を参照してください) ならば ``False`` です。もし ``True`` ならば、 |
| 121 | + そのコメントはサイト上で表示されます。 |
77 | 122 |
|
78 | 123 | .. attribute:: is_removed
|
79 | 124 |
|
80 |
| - ``True`` if the comment was removed. Used to keep track of removed |
81 |
| - comments instead of just deleting them. |
| 125 | + .. ``True`` if the comment was removed. Used to keep track of removed |
| 126 | + comments instead of just deleting them. |
| 127 | + |
| 128 | + コメントが削除されたならば ``True`` になります。コメントを単純に |
| 129 | + 削除するかわりに、削除済みコメントを追跡する目的で使われます。 |
82 | 130 |
|
0 commit comments