I want to call a view function resign_game by clicking an html button. Here is what i have tried after reading some Stackoverflow posts:
<form action="{% url 'resign_game' %}" method="POST">
<button type="button">RESIGN</button>
</form>
Here is what I have in my urls.py:
path('resign_game/', views.resign_current_game, name='resign_game')
However, the view function was never called after I clicked the button. I would appreciate your suggestions. Thanks!