

@login_required
def remove_vote(request, suggestion_id):
    suggestion = Suggestion.objects.get(pk=suggestion_id)
    suggestion.rating.delete(request.user, request.META['REMOTE_ADDR'])
    return HttpResponseRedirect('../../')

dataset/ETHPy150Open azavea/Open-Data-Catalog/OpenDataCatalog/suggestions/views.py remove_vote/original