How do I call a Django function on button click?
问题 I am trying to write a Django application and I am stuck at how I can call a view function when a button is clicked. In my template, I have a link button as below, when clicked it takes you to a different webpage: <a target="_blank" href="{{ column_3_item.link_for_item }}">Check It Out</a> When the button is clicked, I also want to call a Django view function (along with re-direct to a target website). The view function increments the value in the database which stores the number of times the