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()
- [Answered ]-How to handle ManyToMany fields while testing django-models?
- [Answered ]-How to download using django?
- [Answered ]-Loading picture for django templates via css
Source:stackexchange.com