1 2 3 4 5 6 7 8
def __unicode__(self): format = [self.content_type, self.content_object, self.site] if self.url: format.append(self.url) string = '%s "%s" on http://%s/%s/' else: string = '%s "%s" on http://%s/' return smart_unicode(string %tuple(format))