def __call__(self, request, content_type_id, object_id, field_name, score):
try:<EOL><INDENT>instance = self.get_instance(content_type_id, object_id)<EOL><DEDENT>except ObjectDoesNotExist:<EOL><INDENT>raise Http404('<STR_LIT>')<EOL><DEDENT>context = self.get_context(request)<EOL>context['<STR_LIT>'] = instance<EOL>try:<EOL><INDENT>field = getattr(instance, field_name)<EOL><DEDENT>except AttributeError:<EOL><INDENT>return self.invalid_field_response(request, context)<EOL><DEDENT>context.update({<EOL>'<STR_LIT>': field,<EOL>'<STR_LIT>': score,<EOL>})<EOL>had_voted = bool(field.get_rating_for_user(request.user, request.META['<STR_LIT>'], request.COOKIES))<EOL>context['<STR_LIT>'] = had_voted<EOL>try:<EOL><INDENT>adds = field.add(score, request.user, request.META.get('<STR_LIT>'), request.COOKIES)<EOL><DEDENT>except IPLimitReached:<EOL><INDENT>return self.too_many_votes_from_ip_response(request, context)<EOL><DEDENT>except AuthRequired:<EOL><INDENT>return self.authentication_required_response(request, context)<EOL><DEDENT>except InvalidRating:<EOL><INDENT>return self.invalid_rating_response(request, context)<EOL><DEDENT>except CannotChangeVote:<EOL><INDENT>return self.cannot_change_vote_response(request, context)<EOL><DEDENT>except CannotDeleteVote:<EOL><INDENT>return self.cannot_delete_vote_response(request, context)<EOL><DEDENT>if had_voted:<EOL><INDENT>return self.rating_changed_response(request, context, adds)<EOL><DEDENT>return self.rating_added_response(request, context, adds)<EOL>
__call__(request, content_type_id, object_id, field_name, score)

        Adds a vote to the specified model field.