PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/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
Possible License(s): BSD-3-Clause
  1. ===========================
  2. The built-in comment models
  3. ===========================
  4. .. module:: django.contrib.comments.models
  5. :synopsis: The built-in comment models
  6. .. class:: Comment
  7. Django's built-in comment model. Has the following fields:
  8. .. attribute:: content_object
  9. A :class:`~django.contrib.contettypes.generic.GenericForeignKey`
  10. attribute pointing to the object the comment is attached to. You can use
  11. this to get at the related object (i.e. ``my_comment.content_object``).
  12. Since this field is a
  13. :class:`~django.contrib.contettypes.generic.GenericForeignKey`, it's
  14. actually syntactic sugar on top of two underlying attributes, described
  15. below.
  16. .. attribute:: content_type
  17. A :class:`~django.db.models.ForeignKey` to
  18. :class:`~django.contrib.contenttypes.models.ContentType`; this is the
  19. type of the object the comment is attached to.
  20. .. attribute:: object_pk
  21. A :class:`~django.db.models.TextField` containing the primary
  22. key of the object the comment is attached to.
  23. .. attribute:: site
  24. A :class:`~django.db.models.ForeignKey` to the
  25. :class:`~django.contrib.sites.models.Site` on which the comment was
  26. posted.
  27. .. attribute:: user
  28. A :class:`~django.db.models.ForeignKey` to the
  29. :class:`~django.contrib.auth.models.User` who posted the comment.
  30. May be blank if the comment was posted by an unauthenticated user.
  31. .. attribute:: user_name
  32. The name of the user who posted the comment.
  33. .. attribute:: user_email
  34. The email of the user who posted the comment.
  35. .. attribute:: user_url
  36. The URL entered by the person who posted the comment.
  37. .. attribute:: comment
  38. The actual content of the comment itself.
  39. .. attribute:: submit_date
  40. The date the comment was submitted.
  41. .. attribute:: ip_address
  42. The IP address of the user posting the comment.
  43. .. attribute:: is_public
  44. ``False`` if the comment is in moderation (see
  45. :doc:`/ref/contrib/comments/moderation`); If ``True``, the comment will
  46. be displayed on the site.
  47. .. attribute:: is_removed
  48. ``True`` if the comment was removed. Used to keep track of removed
  49. comments instead of just deleting them.