how to send jquery / ajax with more than one data using django function based view

0

I would like to submit a form and a list when submitting the form, type I have a form and a list with ids areas = [1,6,5] how do I get the two to be sent in the post, I want to take this list and use in mine that is also the view that treats the form, but when I try send the list along with the form my request.POST this None

 $('#documet').ready(function(){        
        $('#project_form_id').on('submit', function(event){
            event.preventDefault()
            var form = $(this)

            $.ajax({
                url: "{% url 'project_create' %}",
                method: "POST",
                data:form.serialize(),
                dataType: 'json',
                headers: {'X-CSRFToken': '{{ csrf_token }}'},        
                success: function(response){
                    console.log('success')
                    console.log(list_area)
                    $('#project_form_id').reset(); 
                },
                error:function(error){
                    console.log(error)
                    //$("#modal-book .modal-content").html(data.html_form);

                }
            });

        })
    })
    
asked by anonymous 01.06.2018 / 14:16

0 answers