Ticket #6185: frecomment_removed_auto_add_now.diff
File frecomment_removed_auto_add_now.diff, 1.1 KB (added by , 17 years ago) |
---|
-
django/contrib/comments/models.py
159 159 object_id = models.IntegerField(_('object ID')) 160 160 comment = models.TextField(_('comment'), max_length=3000) 161 161 person_name = models.CharField(_("person's name"), max_length=50) 162 submit_date = models.DateTimeField(_('date/time submitted') , auto_now_add=True)162 submit_date = models.DateTimeField(_('date/time submitted')) 163 163 is_public = models.BooleanField(_('is public')) 164 164 ip_address = models.IPAddressField(_('ip address')) 165 165 # TODO: Change this to is_removed, like Comment … … 193 193 194 194 get_content_object.short_description = _('Content object') 195 195 196 def save(self): 197 if not self.pk: 198 self.submit_date = datetime.datetime.now() 199 super(FreeComment, self).save() 200 196 201 class KarmaScoreManager(models.Manager): 197 202 def vote(self, user_id, comment_id, score): 198 203 try: