'Boost recent releases'

def prepare(self, obj):

    data = super().prepare(obj)
    now = timezone.now()
    three_months = (now - datetime.timedelta(days=90))
    six_months = (now - datetime.timedelta(days=180))
    two_years = (now - datetime.timedelta(days=730))
    if (obj.release_date >= three_months):
        data['boost'] = 1.2
    elif (obj.release_date >= six_months):
        data['boost'] = 1.1
    elif (obj.release_date <= two_years):
        data['boost'] = 0.8
    return data
