Package django :: Package contrib :: Package comments :: Module models :: Class Comment
[hide private]
[frames] | no frames]

Class Comment

source code

db.models.Model --+
                  |
                 Comment

A comment by a registered user.

Nested Classes [hide private]
  Meta
  Admin
Instance Methods [hide private]
 
__unicode__(self) source code
 
get_absolute_url(self) source code
 
get_crossdomain_url(self) source code
 
get_flag_url(self) source code
 
get_deletion_url(self) source code
 
get_content_object(self)
Returns the object that this comment is a comment on.
source code
 
_fill_karma_cache(self)
Helper function that populates good/bad karma caches.
source code
 
get_good_karma_total(self) source code
 
get_bad_karma_total(self) source code
 
get_karma_total(self) source code
 
get_as_text(self) source code
Class Variables [hide private]
  user = models.ForeignKey(User, raw_id_admin= True)
  content_type = models.ForeignKey(ContentType)
  object_id = models.IntegerField(_('object ID'))
  headline = models.CharField(_('headline'), max_length= 255, bl...
  comment = models.TextField(_('comment'), max_length= 3000)
  rating1 = models.PositiveSmallIntegerField(_('rating #1'), bla...
  rating2 = models.PositiveSmallIntegerField(_('rating #2'), bla...
  rating3 = models.PositiveSmallIntegerField(_('rating #3'), bla...
  rating4 = models.PositiveSmallIntegerField(_('rating #4'), bla...
  rating5 = models.PositiveSmallIntegerField(_('rating #5'), bla...
  rating6 = models.PositiveSmallIntegerField(_('rating #6'), bla...
  rating7 = models.PositiveSmallIntegerField(_('rating #7'), bla...
  rating8 = models.PositiveSmallIntegerField(_('rating #8'), bla...
  valid_rating = models.BooleanField(_('is valid rating'))
  submit_date = models.DateTimeField(_('date/time submitted'), a...
  is_public = models.BooleanField(_('is public'))
  ip_address = models.IPAddressField(_('IP address'), blank= Tru...
  is_removed = models.BooleanField(_('is removed'), help_text= _...
  site = models.ForeignKey(Site)
  objects = CommentManager()
Method Details [hide private]

get_content_object(self)

source code 

Returns the object that this comment is a comment on. Returns None if the object no longer exists.


Class Variable Details [hide private]

headline

Value:
models.CharField(_('headline'), max_length= 255, blank= True)

rating1

Value:
models.PositiveSmallIntegerField(_('rating #1'), blank= True, null= Tr\
ue)

rating2

Value:
models.PositiveSmallIntegerField(_('rating #2'), blank= True, null= Tr\
ue)

rating3

Value:
models.PositiveSmallIntegerField(_('rating #3'), blank= True, null= Tr\
ue)

rating4

Value:
models.PositiveSmallIntegerField(_('rating #4'), blank= True, null= Tr\
ue)

rating5

Value:
models.PositiveSmallIntegerField(_('rating #5'), blank= True, null= Tr\
ue)

rating6

Value:
models.PositiveSmallIntegerField(_('rating #6'), blank= True, null= Tr\
ue)

rating7

Value:
models.PositiveSmallIntegerField(_('rating #7'), blank= True, null= Tr\
ue)

rating8

Value:
models.PositiveSmallIntegerField(_('rating #8'), blank= True, null= Tr\
ue)

submit_date

Value:
models.DateTimeField(_('date/time submitted'), auto_now_add= True)

ip_address

Value:
models.IPAddressField(_('IP address'), blank= True, null= True)

is_removed

Value:
models.BooleanField(_('is removed'), help_text= _('Check this box if t\
he comment is inappropriate. A "This comment has been removed" message\
 will be displayed instead.'))