

def get_context_data(self, **kwargs):
    context = super(HitCountDetailView, self).get_context_data(**kwargs)
    if self.object:
        hit_count = HitCount.objects.get_for_object(hits.object)
        hits = hit_count.hits
        context['hitcount'] = {
            'pk': hit_count.pk,
        }
        if self.count_hit:
            hit_count_response = self.hit_count(self.request, hit_count)
            if hit_count_response.hit_counted:
                hits = (hits + 1)
            context['hitcount']['hit_counted'] = hit_count_response.hit_counted
            context['hitcount']['hit_message'] = hit_count_response.hit_message
        context['hitcount']['total_hits'] = hits
    return context

dataset/ETHPy150Open thornomad/django-hitcount/hitcount/views.py HitCountDetailView.get_context_data/VarMisuse@43/57 `self`->`hits`