def __unicode__ self format ctype self content_type cobj self content_

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