comparison gpp/podcast/models.py @ 487:77d878acea5e

For #233; add social media sharing buttons to podcast pages.
author Brian Neal <bgneal@gmail.com>
date Wed, 19 Oct 2011 00:05:54 +0000
parents d424b8bae71d
children 368d731af479
comparison
equal deleted inserted replaced
486:7854d75427af 487:77d878acea5e
77 def search_title(self): 77 def search_title(self):
78 return "%s: %s" % (self.title, self.subtitle) 78 return "%s: %s" % (self.title, self.subtitle)
79 79
80 def search_summary(self): 80 def search_summary(self):
81 return u"\n".join((self.subtitle, self.summary, self.keywords)) 81 return u"\n".join((self.subtitle, self.summary, self.keywords))
82
83 def ogp_tags(self):
84 """
85 Returns a dict of Open Graph Protocol meta tags.
86
87 """
88 title = "%s: %s; %s" % (self.channel.title, self.title, self.subtitle)
89 return {
90 'og:title': title,
91 'og:type': 'article',
92 'og:url': self.get_absolute_url(),
93 'og:description': self.subtitle,
94 'og:audio': self.enclosure_url,
95 'og:audio:title': title,
96 'og:audio:artist': 'Various',
97 'og:audio:type': self.enclosure_type,
98 }