|
@@ -33,6 +33,17 @@ class LogEntry(models.Model):
|
|
|
def __repr__(self):
|
|
|
return smart_unicode(self.action_time)
|
|
|
|
|
|
+ def __unicode__(self):
|
|
|
+
|
|
|
+ if self.action_flag == ADDITION:
|
|
|
+ return _('Added "%(object)s".') % {'object': self.object_repr}
|
|
|
+ elif self.action_flag == CHANGE:
|
|
|
+ return _('Changed "%(object)s" - %(changes)s') % {'object': self.object_repr, 'changes': self.change_message}
|
|
|
+ elif self.action_flag == DELETION:
|
|
|
+ return _('Deleted "%(object)s."') % {'object': self.object_repr}
|
|
|
+
|
|
|
+ return_value = _('LogEntry Object')
|
|
|
+
|
|
|
def is_addition(self):
|
|
|
return self.action_flag == ADDITION
|
|
|
|
|
@@ -53,4 +64,4 @@ class LogEntry(models.Model):
|
|
|
"""
|
|
|
if self.content_type and self.object_id:
|
|
|
return mark_safe(u"%s/%s/%s/" % (self.content_type.app_label, self.content_type.model, quote(self.object_id)))
|
|
|
- return None
|
|
|
+ return None
|