def publishing_column(self, obj):
        """
        Render publishing-related status icons and view links for display in
        the admin.
        """
        # TODO Hack to convert polymorphic objects to real instances
        if hasattr(obj, 'get_real_instance'):
            obj = obj.get_real_instance()

        try:
            object_url = obj.get_absolute_url()
        except (NoReverseMatch, AttributeError):
            object_url = ''

        template_name = 'admin/publishing/_change_list_publishing_column.html'
        t = loader.get_template(template_name)
        c = Context({
            'object': obj,
            'object_url': object_url,
            'has_publish_permission':
                self.has_publish_permission(self.request, obj),
            'has_preview_permission':
                self.has_preview_permission(self.request, obj),
        })
        try:
            if isinstance(obj, PublishingModel):
                c['publish_url'] = reverse(
                    self.publish_reverse(type(obj)), args=(obj.pk, ))
                c['unpublish_url'] = reverse(
                    self.unpublish_reverse(type(obj)), args=(obj.pk, ))
        except NoReverseMatch:
            pass
        return t.render(c)
Render publishing-related status icons and view links for display in
        the admin.