

def post(self, request, *args, **kwargs):
    hitcount_pk = request.POST.get('hitcountPK')
    try:
        hitcount = HitCount.objects.get(pk=hitcount_pk)
    except:
        return HttpResponseBadRequest('HitCount object_pk not working')
    hit_count_response = self.hit_count(request, hitcount)
    return JsonResponse(hit_count_response._asdict())

dataset/ETHPy150Open thornomad/django-hitcount/hitcount/views.py HitCountJSONView.post/original