﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15661	LogEntry objects have no unicode method	Keryn Knight <keryn@…>	ShawnMilo	"This only, as far as I can tell, affects the admin view for deleting objects. When get_deleted_objects is called on an object (eg: an auth.models.User instance) it can find the associated log entries, and display them as part of the list of objects to be culled; as it stands at the moment, when the template displays the data, it just says {{{ LogEntry object }}} or some such.

I attach a simple patch that attempts to resolve that by providing a unicode representation of the logentry type, based on whether its an addition, change or deletion. The wording and string formatting takes its cues from the construct_change_message method on ModelAdmin.

As far as I can foresee, having a default representation of some sort would not provide any obstacles, as any usage of log entries currently in use will either be assembling the data itself (as the {{{ get_admin_log }}} templatetag does), or using a proxy object to do it, which would have to provide its own unicode (which would take precedence).

I'm not sure there's a legitimate case for a LogEntry ''not'' having an object_repr or change_message (both of which are utilised in the patch), but if there is, I've not handled it at current."	New feature	closed	contrib.admin	dev	Normal	fixed	logentry unicode		Ready for checkin	1	0	1	1	1	0
