[Answered ]-How to bind a function to an html button without a form in Django

1👍

You can call your views directly,if are added in urls.py

<div class="submit">
      <button type="button" name="submit" onclick="location.href='{% url 'get_info' %}">Get Info</button>
</div>

0👍

you can use fetche in Javascript to send HTTP request to the URL you want,
in views.py

if request.method == 'POST': #or what method you have choosen 
   get_info()

Leave a comment