In my home.html template:
<button type="button" class="btn btn-dark"
method = 'GET' action = '/action_name/' name="audio_record">Record Audio</button>
In my views.py:
def audio_functions(request):
print('called function')
In my urls.py:
path('/action_name/', views.audio_functions, name='audio-record'),
what am i doing wrong?
Edit: I replaced the button with the suggested version below:
<a href="{% url 'audio-record' %}" class="btn btn-dark"
>Record Audio</a>
But I have a new problem. I actually don't want to redirect to by url/action_name. I just want to trigger the python script within the browser. How can I do this?