#8472: Add "Recent Actions" panel to app_index template
-------------------------------+------------------------------------
Reporter: juliae | Owner: burzak
Type: New feature | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+------------------------------------
Changes (by collinanderson):
* cc: cmawebsite@… (added)
Comment:
If it helps, I personally register the LogEntry model in the admin:
{{{
class LogEntryAdmin(admin.ModelAdmin):
list_display = ['action_time', 'obj', 'content_type', 'user',
'action', 'change_message']
list_filter = ['content_type']
readonly_fields = ['user', 'content_type', 'object_id', 'object_repr',
'action_flag', 'change_message']
def obj(self, obj):
return '<a href="%s">%s</a>' %
(obj.get_edited_object().get_absolute_url(),
conditional_escape(obj.object_repr))
obj.allow_tags = True
obj.admin_sort_field = 'object_repr'
def action(self, obj):
return (u'%s' % obj).split()[0]
obj.admin_sort_field = 'action_flag'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/8472#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.89a031b0f6c9ee90df47f39cc464b408%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.