'Generate rating string for Descriptions.
Starting with database rating (0-10), return 5 stars, with 0-5 filled,
balance empty.
Args:
book (dict): book metadata
Return:
rating (str): 5 stars, 1-5 solid, balance empty. Empty str for no rating.'

def generate_rating_string(self, book):

    rating = ''
    try:
        if ('rating' in book):
            stars = (int(book['rating']) / 2)
            if stars:
                star_string = (self.SYMBOL_FULL_RATING * stars)
                empty_stars = (self.SYMBOL_EMPTY_RATING * (5 - stars))
                rating = ('%s%s' % (star_string, empty_stars))
    except:
        pass
    return rating
