comparison gpp/news/models.py @ 484:bbbc357ac5f3

For #233; first commit for adding social media sharing buttons to news stories.
author Brian Neal <bgneal@gmail.com>
date Tue, 18 Oct 2011 00:04:37 +0000
parents 53fdaf0da539
children 7854d75427af
comparison
equal deleted inserted replaced
483:3ac558402014 484:bbbc357ac5f3
96 def search_title(self): 96 def search_title(self):
97 return self.title 97 return self.title
98 98
99 def search_summary(self): 99 def search_summary(self):
100 return u"\n".join((self.short_text, self.long_text)) 100 return u"\n".join((self.short_text, self.long_text))
101
102 def ogp_tags(self):
103 """
104 Returns a dict of Open Graph Protocol meta tags.
105
106 """
107 return {
108 'og:title': self.title,
109 'og:type': 'article',
110 'og:url': self.get_absolute_url(),
111 'og:image': self.category.icon.url,
112 'og:description': self.title,
113 }