def get_voted_content_for_user(user):
    """Returns a dict where:
        - The key is the content_type model
        - The values are list of id's of the different objects voted by the user
    """
    if user.is_anonymous():
        return {}

    user_votes = {}
    for (ct_model, object_id) in user.votes.values_list("content_type__model", "object_id"):
        list = user_votes.get(ct_model, [])
        list.append(object_id)
        user_votes[ct_model] = list

    return user_votes