示例#1
0
 def get_object_display(self, attachment):
     instance_name = get_attachment_name(self.request, attachment, True)
     vals = {
         "dev": attachment['device'],
         "instance_name": html.strip_tags(instance_name)
     }
     return _("%(dev)s on instance %(instance_name)s") % vals
示例#2
0
 def get_raw_data(self, attachment):
     request = self.table.request
     return safestring.mark_safe(get_attachment_name(request, attachment))