2👍
✅
action parameter in form defines where the pages does a submit not the button.
<form id= "time-form" method = 'POST' action="{% url 'tande:create_time' %}" class="dynamic-form" enctype="multipart/form-data">{% csrf_token %}
<div id="formset-container" class = "formset-container">
<table>
<--form is in here-->
</table>
<ul>{{ newtime_formset.errors }}</ul>
</div>
</br>
<div>
<input type = "submit" id = "save" value = "Save Timesheet">
</div>
</form>
Also in your view you will need to django reverse url resolver
def create_time(request):
#below isn't printing
print "create_time view"
#save the form in here
return HttpResponseRedirect(reverse('timesheet', kwargs={"timesheet_id":<timesheet_id>}))
Source:stackexchange.com