Answers for "ajax django send array"

0

ajax django send array

from django.http import HttpResponse

def edit_lists(request):
    tasks = request.POST.getlist('tasks[]')
    return HttpResponse('Success')
Posted by: Guest on March-28-2020
0

ajax django send array

$('.btn-group').find('#mark_as_done').on('click', function() {
    var tasks = grab_selected();

    $.ajax({
        type: 'POST',
        url: '/edit_lists/',
        data: {'tasks[]': tasks},
    });
});
Posted by: Guest on March-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language