'The \'history\' admin view for this model.'

def history_view(self, request, object_id, extra_context=None):

    from django.contrib.admin.models import LogEntry
    model = self.model
    opts = model._meta
    app_label = opts.app_label
    action_list = LogEntry.objects.filter(object_id=object_id, content_type__id__exact=ContentType.objects.get_for_model(model).id).select_related().order_by('action_time')
    obj = get_object_or_404(model, pk=unquote(object_id))
    context = {'title': (_('Change    history:    %s') % force_unicode(obj)), 'action_list': action_list, 'module_name': capfirst(force_unicode(opts.verbose_name_plural)), 'object': obj, 'root_path': self.admin_site.root_path, 'app_label': app_label}
    context.update((extra_context or {}))
    context_instance = template.RequestContext(request, current_app=self.admin_site.name)
    return render_to_response((self.object_history_template or [('admin/%s/%s/object_history.html' % (app_label, opts.object_name.lower())), ('admin/%s/object_history.html' % app_label), 'admin/object_history.html']), context, context_instance=context_instance)
