def donation_percentage(ticket):
    """
        Gets the percentage value of the donations earned in relation to donations goal
        :param ticket: The ticket requested to get the donation percentage of
        :return: percentage value of donations earned
    """
    if ticket.feature.donation_goal == 0:
        return 0

    return (float(ticket.feature.total_donations)/float(ticket.feature.donation_goal)) * 100