+ def update_popularity(self):
+ count = self.tags.filter(category='set').values('user').order_by('user').distinct().count()
+ try:
+ pop = self.popularity
+ pop.count = count
+ pop.save()
+ except BookPopularity.DoesNotExist:
+ BookPopularity.objects.create(book=self, count=count)
+
+ def ridero_link(self):
+ return 'https://ridero.eu/%s/books/wl_%s/' % (get_language(), self.slug.replace('-', '_'))
+