Ticket #15661: django-logentry-unicode.2.diff
File django-logentry-unicode.2.diff, 780 bytes (added by , 14 years ago) |
---|
-
django/contrib/admin/models.py
33 33 def __repr__(self): 34 34 return smart_unicode(self.action_time) 35 35 36 def __unicode__(self): 37 action_output = { 38 ADDITION: _('Added "%(object)s".') % {'object': self.object_repr}, 39 CHANGE: _('Changed "%(object)s" - %(changes)s') % {'object': self.object_repr, 'changes': self.change_message}, 40 DELETION: _('Deleted "%(object)s."') % {'object': self.object_repr}, 41 } 42 return action_output[self.action_flag] 43 36 44 def is_addition(self): 37 45 return self.action_flag == ADDITION 38 46