diff --git a/core/models.py b/core/models.py index 16c0dc42..7cbd949a 100755 --- a/core/models.py +++ b/core/models.py @@ -104,30 +104,7 @@ class Work(models.Model): def cover_image_small(self): server_id = random.randint(0, 9) gb_id = self.editions.all()[0].googlebooks_id - return "http://bks%i.books.google.com/books?id=%s&printsec=frontcover&img=1&zoom=5" % (server_id, gb_id) - - @property - def status(self): - """status based on associated campaigns if any.""" - - campaigns = self.campaigns.all() - unglued = False - active = False - - for c in campaigns: - status = c.status - if status == 'ACTIVE': - active = True - elif status == 'SUCCESSFUL': - unglued = True - - if unglued: - return 'UNGLUED' - elif active: - return 'ACTIVE CAMPAIGN' - else: - return 'NO ACTIVE CAMPAIGN' - + return "http://bks%i.books.google.com/books?id=%s&printsec=frontcover&img=1&zoom=5" % (server_id, gb_id) def __unicode__(self): return self.title