the site has a button, it is necessary that when you click on it the counter in the database increased. I solved this problem by going to the url with the function, but do not know how to call it without reloading the page.
def add_show_phone(request, product_id):
entry = Entry.objects.get(id=product_id)
entry.count_show_phone += 1
entry.save()
return HttpResponseRedirect('/product/' + product_id)