Ticket #9303: 9303_model.diff

File 9303_model.diff, 2.0 KB (added by thejaswi_puthraya, 7 years ago)

Second method that changes BaseCommentAbstractModel

  • django/contrib/comments/models.py

    diff --git a/django/contrib/comments/models.py b/django/contrib/comments/models.py
    index c0613dc..4737932 100644
    a b class BaseCommentAbstractModel(models.Model): 
    2222            related_name="content_type_set_for_%(class)s")
    2323    object_pk      = models.TextField(_('object ID'))
    2424    content_object = generic.GenericForeignKey(ct_field="content_type", fk_field="object_pk")
     25    is_public      = models.BooleanField(_('is public'), default=True,
     26                                         help_text=_('Uncheck this box to make the comment effectively ' \
     27                                                         'disappear from the site.'))
     28    is_removed     = models.BooleanField(_('is removed'), default=False,
     29                                         help_text=_('Check this box if the comment is inappropriate. ' \
     30                                                         'A "This comment has been removed" message will ' \
     31                                                         'be displayed instead.'))
    2532
    2633    # Metadata about the comment
    2734    site        = models.ForeignKey(Site)
    class Comment(BaseCommentAbstractModel): 
    5663    # Metadata about the comment
    5764    submit_date = models.DateTimeField(_('date/time submitted'), default=None)
    5865    ip_address  = models.IPAddressField(_('IP address'), blank=True, null=True)
    59     is_public   = models.BooleanField(_('is public'), default=True,
    60                     help_text=_('Uncheck this box to make the comment effectively ' \
    61                                 'disappear from the site.'))
    62     is_removed  = models.BooleanField(_('is removed'), default=False,
    63                     help_text=_('Check this box if the comment is inappropriate. ' \
    64                                 'A "This comment has been removed" message will ' \
    65                                 'be displayed instead.'))
    6666
    6767    # Manager
    6868    objects = CommentManager()
Back to Top