ajax django send array
from django.http import HttpResponse
def edit_lists(request):
tasks = request.POST.getlist('tasks[]')
return HttpResponse('Success')$('.btn-group').find('#mark_as_done').on('click', function() {
var tasks = grab_selected();
$.ajax({
type: 'POST',
url: '/edit_lists/',
data: {'tasks[]': tasks},
});
});
Also in JavaScript:
- rounding up a number so that it is divisible by 5 javascript
- random item from array javascript
- the red validation class doesn't apply on jquery
- nodejs btoa
- jquery disable keypress
- how to create a component in react native
- for each python json
- javascript select input text on focus
- crucer in js
- dynsmic calss in react add
- javascript includes
- javascript random()
- javascript date difference in months
- javaScript disable submit button until form is fully validated
- makes number negative javascript
- clear terminal node js
- javascript find the longest string in array
- output angular
- fetch is not defined amazon-cognito-identity-js
- testing library react hooks
- datepicker select date programmatically bootstrap
- JsonConvert.DeserializeObject convert into dynamic datatable
- change color by java scribt
- axios js and react