def history_view(self, request, object_id, extra_context=None):
        "The 'history' admin view for this model."
        from django.contrib.admin.models import LogEntry
        # First check if the user can see this history.
        model = self.model
        obj = get_object_or_404(self.get_queryset(request),
                                pk=unquote(object_id))
        if not self.has_change_permission(request, obj):
            raise PermissionDenied

        # Then get the history for this object.
        opts = model._meta
        app_label = opts.app_label
        action_list = LogEntry.objects.filter(
            object_id=unquote(str(obj.identity)),
            # this is the change for our override;
            content_type=get_content_type_for_model(model)
        ).select_related().order_by('action_time')
        ctx = self.admin_site.each_context(request)

        context = dict(ctx,
                       title=('Change history: %s') % force_text(obj),
                       action_list=action_list,
                       module_name=capfirst(
                           force_text(opts.verbose_name_plural)),
                       object=obj,
                       opts=opts,
                       preserved_filters=self.get_preserved_filters(request),
                       )
        context.update(extra_context or {})
        return TemplateResponse(request, self.object_history_template or [
            "admin/%s/%s/object_history.html" % (app_label, opts.model_name),
            "admin/%s/object_history.html" % app_label,
            "admin/object_history.html"
        ], context)